Date picker
A date picker allows the user to select a particular date.Props
| Description | Set the appearance of the picker.
|
|---|---|
| Type | "none" | "default" | "subtle" |
| Description | Used to associate accessible descriptions to the date picker. |
|---|---|
| Type | string |
| Description | Set the picker to autofocus on mount. |
|---|---|
| Type | boolean |
| Description | Set the |
|---|---|
| Type | string |
| Description | You should not be accessing this prop under any circumstances.
It is provided by |
|---|---|
| Type | (payload: AnalyticsEventPayload) => UIAnalyticsEvent |
| Description | Format the date with a string that is accepted by date-fns's format
function. When set, the default
parser also uses this format (via date-fns) so displayed labels re-parse.
Without Note that though we are using |
|---|---|
| Type | string |
| Description | The default for |
|---|---|
| Type | boolean |
| Description | The default for |
|---|---|
| Type | string |
| Description | An array of ISO dates that should be disabled on the calendar. This does not affect what users can type into the picker. |
|---|---|
| Type | string[] |
| Description | A filter function for disabling dates on the calendar. This does not affect what users can type into the picker. The function is called with a date string in the format |
|---|---|
| Type | (date: string) => boolean |
| Description | A function for formatting the date displayed in the input. By default composes together Note that this does not affect how the input is parsed. Use |
|---|---|
| Type | (value: string, dateFormat: string) => string |
| Description | Hides icon for dropdown indicator. |
|---|---|
| Type | boolean |
| Description | The icon shown in the picker. |
|---|---|
| Type | ComponentClass<DropdownIndicatorProps<OptionType, boolean, GroupBase<OptionType>>, any> | FunctionComponent<...> |
| Description | Set the id of the field.
Associates a |
|---|---|
| Type | string |
| Description | Props to apply to the container. If you are looking to set your width, use a |
|---|---|
| Type | AllHTMLAttributes<HTMLElement> |
| Description | The name of the input, used when |
|---|---|
| Default | 'Date picker' |
| Type | string |
| Description | The ID of the label for the input, used when |
|---|---|
| Type | string |
| Description | Set if the picker is disabled. |
|---|---|
| Type | boolean |
| Description | Set if the picker has an invalid value. |
|---|---|
| Type | boolean |
| Description | Set if the picker is open. |
|---|---|
| Type | boolean |
| Description | Set the field as required. |
|---|---|
| Type | boolean |
| Description | Accessible name for the Date Picker Select, rendered as |
|---|---|
| Type | string |
| Description | Locale used to format the date and calendar. See DateTimeFormat. |
|---|---|
| Type | string |
| Description | The latest enabled date. Dates after this are disabled on the calendar. This does not affect what users can type into the picker. |
|---|---|
| Type | string |
| Description | The earliest enabled date. Dates before this are disabled on the calendar. This does not affect what users can type into the picker. |
|---|---|
| Type | string |
| Description | The name of the field. |
|---|---|
| Type | string |
| Description | The aria-label attribute associated with the next-month arrow. |
|---|---|
| Type | string |
| Description | Called when the field is blurred. |
|---|---|
| Type | (event: FocusEvent<HTMLInputElement, Element>) => void |
| Description | Called when the value changes. The only argument is an ISO time or empty string. |
|---|---|
| Type | (value: string) => void |
| Description | Called when the field is focused. |
|---|---|
| Type | (event: FocusEvent<HTMLInputElement, Element>) => void |
| Description | The label associated with the button to open the calendar, rendered via the
|
|---|---|
| Default | 'open calendar' |
| Type | string |
| Description | A function for parsing input characters and transforming them into a Date object.
Overrides the default parser. By default, when |
|---|---|
| Type | (date: string, dateFormat: string) => Date |
| Description | Placeholder text displayed in input. |
|---|---|
| Type | string |
| Description | The aria-label attribute associated with the previous-month arrow. |
|---|---|
| Type | string |
| Description | No description. |
|---|---|
| Type | ((instance: any) => void) | RefObject<any> |
| Description | No description. |
|---|---|
| Type | Omit<SelectProps<OptionType, false>, "aria-describedby" | "aria-label" | "placeholder" | "inputId"> & { 'aria-describedby'?: never; 'aria-label'?: never; inputId?: never; placeholder?: never; } |
| Description | Provides a functional calendar button that opens the calendar picker that lives on the right side of the date picker. The accessible name for this button is caculated using either the |
|---|---|
| Default | false |
| Type | boolean |
| Description | The spacing for the select control. Compact is |
|---|---|
| Type | "default" | "compact" |
| Description | A
|
|---|---|
| Type | string |
| Description | The ISO time used as the input value. |
|---|---|
| Type | string |
| Description | Start day of the week for the calendar.
|
|---|---|
| Type | 0 | 1 | 2 | 3 | 4 | 5 | 6 |