|
@@ -839,12 +839,12 @@ function Demo() {
|
|
| bottomSlot | Render the bottom extra area | ReactNode | | **1.22.0** |
|
|
| bottomSlot | Render the bottom extra area | ReactNode | | **1.22.0** |
|
|
| className | Class name | string | - | |
|
|
| className | Class name | string | - | |
|
|
| defaultOpen | Panel displays or hides by default | boolean | false | |
|
|
| defaultOpen | Panel displays or hides by default | boolean | false | |
|
|
-| defaultPickerValue | Default panel date | string\|Date\|number\|string[]\|Date[]\|number[] | | |
|
|
|
|
-| defaultValue | Default | string | Date\|number\|string[]\|Date[]\|number[] | | |
|
|
|
|
|
|
+| defaultPickerValue | Default panel date | ValueType | | |
|
|
|
|
+| defaultValue | Default value | ValueType | | | |
|
|
| density | Density of picker panel, one of `default`, `compact` | string | default | **1.17.0** |
|
|
| density | Density of picker panel, one of `default`, `compact` | string | default | **1.17.0** |
|
|
| disabled | Is it disabled? | boolean | false | |
|
|
| disabled | Is it disabled? | boolean | false | |
|
|
-| disabledDate | The date is prohibited from the judgment method, and the date is prohibited when returned to true. Options parameter supported after 1.9.0 and rangeEnd supported after 1.29 | (date: Date, options: { rangeStart: string, rangeEnd: string }) => boolean | () = > false | |
|
|
|
|
-| disabledTime | Time prohibition configuration, the return value will be transparently passed to [`TimePicker`](/en-US/input/timepicker#API_Reference) as a parameter | (date: Date \| Date[], panelType?: string) => ({ <br/>disabledHours:() => number[], <br/>disabledMinutes: (hour: number) => number[], <br/>disabledSeconds: (hour: number, minute: number) => number[] }) | () => false | **0.36.0** |
|
|
|
|
|
|
+| disabledDate | The date is prohibited from the judgment method, and the date is prohibited when returned to true. Options parameter supported after 1.9.0 and rangeEnd supported after 1.29 | <ApiType detail='(date: Date, options: { rangeStart: string, rangeEnd: string }) => boolean'>(date, options) => boolean</ApiType> | () = > false | |
|
|
|
|
+| disabledTime | Time prohibition configuration, the return value will be transparently passed to [`TimePicker`](/en-US/input/timepicker#API_Reference) as a parameter | <ApiType detail='(date: Date \| Date[], panelType?: string) => ({ disabledHours:() => number[], disabledMinutes: (hour: number) => number[], disabledSeconds: (hour: number, minute: number) => number[] })'>(date, panelType) => object</ApiType> | () => false | **0.36.0** |
|
|
| disabledTimePicker | Disable time selection or not. | boolean | | **0.32.0** |
|
|
| disabledTimePicker | Disable time selection or not. | boolean | | **0.32.0** |
|
|
| dropdownClassName | CSS classname for drop-down menu | string | | **1.13.0** |
|
|
| dropdownClassName | CSS classname for drop-down menu | string | | **1.13.0** |
|
|
| dropdownStyle | Inline style of drop-down menu | object | | **1.13.0** |
|
|
| dropdownStyle | Inline style of drop-down menu | object | | **1.13.0** |
|
|
@@ -857,12 +857,12 @@ function Demo() {
|
|
| insetLabel | Prefix label, lower priority than `prefix` | string\|ReactNode | | |
|
|
| insetLabel | Prefix label, lower priority than `prefix` | string\|ReactNode | | |
|
|
| max | When multiple is set to true, the number of selected, non-pass or value is null\|undefined, unlimited. | number | - | |
|
|
| max | When multiple is set to true, the number of selected, non-pass or value is null\|undefined, unlimited. | number | - | |
|
|
| multiple | Whether you can choose multiple, only type = "date" is supported | boolean | false | |
|
|
| multiple | Whether you can choose multiple, only type = "date" is supported | boolean | false | |
|
|
-| needConfirm | Do you need to "confirm selection", only `type= "dateTime"|"dateTimeRange"` works. | boolean | | **0.18.0** |
|
|
|
|
|
|
+| needConfirm | Do you need to "confirm selection", only `type= "dateTime"\| "dateTimeRange"` works. | boolean | | **0.18.0** |
|
|
| open | Controlled properties displayed or hidden by panels | boolean | | |
|
|
| open | Controlled properties displayed or hidden by panels | boolean | | |
|
|
| placeholder | Input box prompts text | string | 'Select date' | |
|
|
| placeholder | Input box prompts text | string | 'Select date' | |
|
|
| position | Floating layer position, optional value with [Popover #API Reference · position](/en-US/show/popover#API%20Reference) | string | 'bottomLeft' | |
|
|
| position | Floating layer position, optional value with [Popover #API Reference · position](/en-US/show/popover#API%20Reference) | string | 'bottomLeft' | |
|
|
| prefix | Prefix content | string\|ReactNode | | |
|
|
| prefix | Prefix content | string\|ReactNode | | |
|
|
-| presets | Date Time Shortcut | Array < {start: string\|Date\|number, end: string\|Date\|number, text: string}\| function(): {start: string\|Date\|number, end: string\|Date\|number, text: string} > | [] | |
|
|
|
|
|
|
+| presets | Date Time Shortcut | <ApiType detail='Array< { start: BaseValueType, end :BaseValueType, text: string } \| () => { start:B aseValueType, end: BaseValueType, text: string }>'>Array</ApiType> | [] | |
|
|
| preventScroll | Indicates whether the browser should scroll the document to display the newly focused element, acting on the focus method inside the component, excluding the component passed in by the user | boolean | | |
|
|
| preventScroll | Indicates whether the browser should scroll the document to display the newly focused element, acting on the focus method inside the component, excluding the component passed in by the user | boolean | | |
|
|
| presetPosition | Date time shortcut panel position, optional 'left', 'right', 'top', 'bottom' | 'bottom' | **2.18.0** |
|
|
| presetPosition | Date time shortcut panel position, optional 'left', 'right', 'top', 'bottom' | 'bottom' | **2.18.0** |
|
|
| rangeSeparator | Custom range type picker separator of input trigger | string | '~' | **1.31.0**
|
|
| rangeSeparator | Custom range type picker separator of input trigger | string | '~' | **1.31.0**
|
|
@@ -875,19 +875,40 @@ function Demo() {
|
|
| syncSwitchMonth | In the scene of range, it supports synchronous switching of the month of the dual panel|boolean|false|**1.28.0**|
|
|
| syncSwitchMonth | In the scene of range, it supports synchronous switching of the month of the dual panel|boolean|false|**1.28.0**|
|
|
| timePickerOpts | For other parameters that can be transparently passed to the time selector, see [TimePicker·API Reference](/en-US/input/timepicker#API%20Reference) | | object | **1.1.0** |
|
|
| timePickerOpts | For other parameters that can be transparently passed to the time selector, see [TimePicker·API Reference](/en-US/input/timepicker#API%20Reference) | | object | **1.1.0** |
|
|
| topSlot | Render the top extra area | ReactNode | | **1.22.0** |
|
|
| topSlot | Render the top extra area | ReactNode | | **1.22.0** |
|
|
-| triggerRender | Custom trigger rendering method | ({ placeholder: string }) => ReactNode | | **0.34.0** |
|
|
|
|
-| type | Type, optional value: "date", "dateRange", "dateTime", "dateTimeRange", "month" | string | 'date' | (type "month") **0.21.0** |
|
|
|
|
-| value | Controlled value | string\| Date\|number\| string[]\|Date[]\|number[] | | |
|
|
|
|
|
|
+| triggerRender | Custom trigger rendering method | (TriggerRenderProps) => ReactNode | | **0.34.0** |
|
|
|
|
+| type | Type, optional value: "date", "dateRange", "dateTime", "dateTimeRange", "month" | string | 'date' | |
|
|
|
|
+| value | Controlled value | ValueType | | |
|
|
| weekStartsOn | Take the day of the week as the first day of the week, 0 for Sunday, 1 for Monday, and so on. | number | 0 | |
|
|
| weekStartsOn | Take the day of the week as the first day of the week, 0 for Sunday, 1 for Monday, and so on. | number | 0 | |
|
|
-| onBlur | Callback when focus is lost | (e: domEvent) => void | () => {} | **1.0.0** |
|
|
|
|
-| onCancel | Cancel the callback when selected, enter the reference as the value of the last confirmed selection, only `type` equals "dateTime"or "dateTimeRange" and `needConfirm` equals true | (date: Date\|Date[], dateStr: string\|string[]) => void) <br/>Before 1.0.0, it was (dateStr: string\|string [], date: Date\|Date[]) => void | | **0.18.0** |
|
|
|
|
-| onChange | A callback when the value changes | (date: Date\|Date[], dateStr: string\|string[]) => void) <br/>Before 1.0.0, it was (dateStr: string\|string [], date: Date\|Date[]) => void | | |
|
|
|
|
-| onClear | A callback when click the clear button | (e: domEvent) => void | () => {} | **1.16.0** |
|
|
|
|
-| onConfirm | Confirm the callback at the time of selection, enter the reference as the value of the current selection, only `type` equals "dateTime" or "dateTimeRange" and `needConfirm` equals true | (date: Date\|Date[], dateStr: string\|string[]) => void) <br/>Before 1.0.0, it was (dateStr: string\|string [], date: Date\|Date[]) => void | | **0.18.0** |
|
|
|
|
-| onFocus | Callback when focus is obtained | (e: domEvent) => void | () => {} | **1.0.0** |
|
|
|
|
-| onOpenChange | Panel displays or hides callbacks to state switches | (status: boolean) => void | | |
|
|
|
|
-| onPanelChange | Callback when the year or date of the panel is switched|(date: DateType\|DateType[], dateStr: StringType\|StringType[])=>void|true|**1.28.0**|
|
|
|
|
-| onPresetClick | Callback when click preset button | (item: Object, e: Event) => void | () => {} | **1.24.0** |
|
|
|
|
|
|
+| onBlur | Callback when focus is lost | (event) => void | () => {} | **1.0.0** |
|
|
|
|
+| onCancel | Cancel the callback when selected, enter the reference as the value of the last confirmed selection, only `type` equals "dateTime"or "dateTimeRange" and `needConfirm` equals true | <ApiType detail='(date: DateType, dateStr: StringType) => void'>(date, dateString) => void</ApiType> | | **0.18.0** |
|
|
|
|
+| onChange | A callback when the value changes | <ApiType detail='(date: DateType, dateString: StringType) => void'>(date, dateString) => void</ApiType> | | |
|
|
|
|
+| onClear | A callback when click the clear button | (event) => void | () => {} | **1.16.0** |
|
|
|
|
+| onConfirm | Confirm the callback at the time of selection, enter the reference as the value of the current selection, only `type` equals "dateTime" or "dateTimeRange" and `needConfirm` equals true | <ApiType detail='(date: DateType, dateStr: StringType) => void'>(date, dateString) => void</ApiType>| | **0.18.0** |
|
|
|
|
+| onFocus | Callback when focus is obtained | (event) => void | () => {} | **1.0.0** |
|
|
|
|
+| onOpenChange | Callback when popup open or close | (isOpen) => void | | |
|
|
|
|
+| onPanelChange | Callback when the year or date of the panel is switched| <ApiType detail='(date: DateType \| DateType[], dateStr: StringType \| StringType[])=>void'>(date, dateStr) => void</ApiType> | |**1.28.0**|
|
|
|
|
+| onPresetClick | Callback when click preset button | <ApiType detail='(item: Object, e: Event) => void'>(item, e) => void</ApiType> | **1.24.0** |
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+## Interface Define
|
|
|
|
+
|
|
|
|
+```typescript
|
|
|
|
+type BaseValueType = string | number | Date;
|
|
|
|
+type ValueType = BaseValueType | BaseValueType[];
|
|
|
|
+type DateType = Date | Date[];
|
|
|
|
+type StringType = string | string[];
|
|
|
|
+type TriggerRenderProps = {
|
|
|
|
+ value?: ValueType;
|
|
|
|
+ inputValue?: string;
|
|
|
|
+ placeholder?: string | string[];
|
|
|
|
+ autoFocus?: boolean;
|
|
|
|
+ size?: InputSize;
|
|
|
|
+ disabled?: boolean;
|
|
|
|
+ inputReadOnly?: boolean;
|
|
|
|
+ componentProps?: DatePickerProps;
|
|
|
|
+ [x: string]: any;
|
|
|
|
+};
|
|
|
|
+```
|
|
|
|
|
|
## Accessibility
|
|
## Accessibility
|
|
|
|
|