DatePicker API
API reference docs for theDatePicker
component. For examples and details on the usage of this component, visit the component demo page.
Props
Prop | Type | Description | Default |
---|---|---|---|
calendar | ((props: { close: (selectedDate?: Date) => void }) => React.ReactElement<CalendarProps>) | React.ReactElement<CalendarProps> | The element to be rendered inside of the popover when opened. Preferably a Calendar component. | _ |
formattedValue? | React.ReactNode | Customise how the value is presented in the default trigger. | _ |
trigger? | (props: { triggerProps: ButtonProps; isOpen: boolean; placeholder: string; }) => React.ReactElement<ButtonProps> | Custom trigger component. | _ |
placeholder | string | Placeholder text to be displayed in the date picker trigger. | _ |
onClose? | (selectedDate?: Date) => void | This callback is invoked after the popover has been closed and does not automatically reset the visible month. Consumers can use this event to update or reset state as needed. | _ |