Name | Type | Required | Default | Description |
---|---|---|---|---|
beforeHide | BeforeCallback | false | ||
beforeShow | BeforeCallback | false | The callback to run before the overlay is shown. Returning
| |
className | string | false | Additional classNames | |
disabled | boolean | false | ||
error | boolean | false | Error variant | |
tabIndex | number | false | ||
value | Date | false | ||
variant | DateInputVariant | false | ||
afterHide | Function | false | ||
afterShow | Function | false | ||
disabledDate | Function | false | ||
onChange | Function | false | ||
onClear | Function | false |
Disable dates in the calendar selection. We like to use this with helpers from date-fns.
When looking to compare a random day against today, the second argument returns the start of today as if it happened in the time zone of the DateTimeProvider context.
Reset to today when the user clicks the clear icon.
This component can apply time shifts based on the DateTimeProvider context timeZone. For more on working with time zones, please review the date time guide and the demos.
Intl DateTimeFormat
APIs in tandem with date-fns and date-fns-tz. In order to support IE11, client applications will require a polyfill to enable time zone features.In the example below, "today" to the current user might be the former day of "today" in Sydney, Australia. Notice when selecting the same date in each one, the display is the same but raw value is different.
Using the I18nProvider, DateSelect will order the month, day, and year segments.
Using OverlayTrigger callback methods
The callback to run before the overlay is hidden. Returning
false
will prevent hiding.10.19.0