Getting started
Components
Make sure to connect the Label to the TimePicker. This is done with the htmlFor prop on the label, and the id prop on the Time Picker.
The Time Picker doesn't currently support the selection of time ranges within a single input field, however a time range picker can be easily implemented using two side-by-side Time Pickers.
Paste pickers don't currently support date time range selections in a single component, however the same functionality can be implemented using a combobox along with the date range and time range picker solutions.
In addition to the Time Picker, this package exports a formatReturnTime() function that can be used to format the time value that's being returned from the Time Picker.
Note: the format of the time being displayed by the Time Picker cannot be changed. The display value is formatted according to the locale of the user's browser.
Change a Time Picker to its error state and add an inline error if the value entered doesn't pass validation requirements.
Use a disabled Time Picker to show users that they can't interact with it.
Use a read-only Time Picker when its value can't be changed, but users should be able to read or apply focus on it.
Use inline error text to explain how to fix an error. For additional guidance on how to compose error messages, refer to the error state pattern.
Because Time Picker has a default display value of --:-- -- (and defaults to 12:30 PM on Safari), any value that gets passed into placeholder will be overwritten (and effectively ignored).
Help us improve this component by providing feedback, asking questions on Slack, or updating this file on GitHub.