DateDropdown
A dropdown control that allows the user to select a date range from a calendar.Prop | Required | Description | Type |
---|---|---|---|
value | ✅ | The value of the selected DateRange. | DateRange |
onChange | ✅ | Callback called when the user inputs a valid date in the input, or selects one from the DatePicker. | (value?: DateRange) => void |
fromYear | — | The year the year picker starts from. Defaults to 100 years ago. | number |
toYear | — | The year the year picker ends on. Defaults to the two years in the future of the current year. | number |
disabledDates | — | A list of dates that should be disabled. Can be a list of single dates or a DateRange. | Matcher[] |
initialDisplayDate | — | The initial month displayed on the calendar if no existing date range is entered. Defaults to the current month. | Date |
align | — | Alignment of the dropdown. Defaults to start. | "start" | "center" | "end" |
side | — | Define which side of the trigger the dropdown will be displayed. Defaults to bottom. | "top" | "right" | "bottom" | "left" |
label | — | Trigger button's label. Defaults to Date range. | string |
block | — | Make the trigger button fill its container. | false | trueSupports responsive prop syntax |
disabled | — | Disable the trigger button. Defaults to false. | boolean |