Add Pajamas-compliant datepicker to GitlabUiFormBuilder
What does this MR do and why?
Adds a gitlab_ui_datepicker method to our GitlabUiFormBuilder, following the discussion in #365892 (comment 1047844486).
This way we have single source of truth for datepickers in Haml, making it easier to make and keep them Pajamas-compliant.
Screenshots or screen recordings
No visual changes expected.
How to set up and validate locally
In total we had only 5 places where we've used the plain datepicker CSS class, so it was in scope of this MR to update all of them. To avoid new additions in the future, I've opened gitlab-org/frontend/pajamas-adoption-scanner!36 (merged).
These two instances were using the class for no reason, so I removed it from them, with no effect, but please make sure to visit and use these forms, too, to make sure I haven't missed anything:
- Expiry date in http://gdk.test:3000/groups/flightjs/-/settings/access_tokens (Group > Settings > Access Tokens)
- Weight input in http://gdk.test:3000/flightjs/Flight/-/issues/new (Project > Issues > New)
The following three places now use the new gitlab_ui_datepicker. Go there, compare the resulting HTML and make sure the forms still work as expected:
- Start date and due date in http://gdk.test:3000/groups/flightjs/-/milestones/new (Group > Issues > Milestones > New)
- Expiration date in http://gdk.test:3000/groups/flightjs/-/settings/repository (Group > Settings > Repository)
- Due date in http://gdk.test:3000/flightjs/Flight/-/issues/new (Project > Issues > New)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.