feat(GlDatepicker): add clear button
What does this MR do?
Adds the showClearButton
prop. When set to true
a clear button will be added when the input has a value.
Based on this thread: gitlab#228680 (comment 410751468)
Does this MR meet the acceptance criteria?
Screenshots
With clear | Without clear |
---|---|
This MR also refactors the calendar trigger button to use an actual button component instead of a SVG. This allows the datepicker to be opened with the keyboard. Previously the trigger button was not focusable so there was no way to open the datepicker with the keyboard.
Before refactor | After refactor |
---|---|
Conformity
-
Code review guidelines. -
GitLab UI's contributing guidlines. -
If it changes a Pajamas-compliant component's look & feel, the MR has been reviewed by a UX designer. - [-] If it changes GitLab UI's documentation guidelines, the MR has been reviewed by a Technical Writer.
-
If the MR changes a component's API, integration MR(s) have been opened in the following projects to ensure that the @gitlab/ui
package can be upgraded quickly after the changes are released:-
GitLab: gitlab!44186 (closed) -
Customers Portal: GlDatepicker
not used -
Status Page: GlDatepicker
not used
-
-
Added the ~"component:*"
label(s) if applicable.
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
Security reports checked/validated by a reviewer from the AppSec team
Edited by Peter Hegman