Skip to main content

DatePicker

Container properties

All component configurations support Container properties at the first level.

Component properties

NameTypeDefaultSupports Variable PatternDescription
classNamestring✔️The className of the component
styleobjectThe style of the component
noTimeZoneboolfalseWhether to remove the date time zone information when onChange
showTimebool | objectfalseWhether to display time
formatOptionsobjectAll properties of Intl.DateTimeFormat
disabledDateDisabledDateDisable certain dates when selecting dates

All the remaining componentsProps will be passed to the component root element(DatePicker)。

DisabledDate

NameTypeDefaultDescription
type'before' | 'after' | 'inRange' | 'outRange'Forbidden Type
includeValueboolfalseIf true, the day of value(valueFrom, valueTo) itself is disabled
value'today' | 'tomorrow' | 'yesterday' | number | stringWhen type is equal to the prohibited date before or after, string represents the specific date, and number represents the offset based on the date of the day.
valueOffsetnumberYou can specify valueOffset to move forward or backward as an offset value
valueFrom'today' | 'tomorrow' | 'yesterday' | number | stringWhen type is equal to inRange or outRange, string represents the specific date, and number represents the offset based on the date of the day.
valueFromOffsetnumberYou can specify valueFromOffset as an offset to move forward or backward valueFrom
valueTo'today' | 'tomorrow' | 'yesterday' | number | stringWhen type is equal to inRange or outRange, string represents the specific date, and number represents the offset based on the date of the day.
valueToOffsetnumberYou can specify valueToOffset as an offset to move forward or backward valueFrom

JS API

The interface obtained through formApi.getFieldApi() is as follows:

NameTypeDescription
nodeHTML ElementComponent root DOM element