You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/date-picker/index.en-US.md
+18-6Lines changed: 18 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,6 +83,7 @@ The following APIs are shared by DatePicker, RangePicker.
83
83
| dateRender | Custom rendering function for date cells | v-slot:dateRender="{current, today}" | - ||
84
84
| disabled | Determine whether the DatePicker is disabled | boolean | false ||
85
85
| disabledDate | Specify the date that cannot be selected | (currentDate: dayjs) => boolean | - ||
86
+
| format | To set the date format, refer to [dayjs](https://day.js.org/). When an array is provided, all values are used for parsing and first value is used for formatting, support [Custom Format](#components-date-picker-demo-format)|[formatType](#formatType)|`YYYY-MM-DD`||
86
87
| dropdownClassName | To customize the className of the popup calendar | string | - ||
87
88
| getPopupContainer | To set the container of the floating layer, while the default is to create a `div` element in `body`| function(trigger) | - ||
88
89
| inputReadOnly | Set the `readonly` attribute of the input tag (avoids virtual keyboard on touch devices) | boolean | false ||
@@ -120,7 +121,7 @@ The following APIs are shared by DatePicker, RangePicker.
120
121
| --- | --- | --- | --- | --- |
121
122
| defaultPickerValue | To set default picker date |[dayjs](https://day.js.org/)| - ||
122
123
| disabledTime | To specify the time that cannot be selected | function(date) | - ||
123
-
| format | To set the date format, refer to [dayjs](https://day.js.org/). When an array is provided, all values are used for parsing and first value is used for formatting, support [Custom Format](#components-date-picker-demo-format)| string \| (value: dayjs) => string \| (string \| (value: dayjs) => string)\[]|`YYYY-MM-DD`||
124
+
| format | To set the date format, refer to [dayjs](https://day.js.org/)|[formatType](#formatType)|`YYYY-MM-DD`||
124
125
| renderExtraFooter | Render extra footer in panel | v-slot:renderExtraFooter="mode" | - ||
125
126
| showNow | Whether to show 'Now' button on panel when `showTime` is set | boolean | - ||
126
127
| showTime | To provide an additional time selection | object \| boolean |[TimePicker Options](/components/time-picker/#API)||
@@ -139,26 +140,26 @@ The following APIs are shared by DatePicker, RangePicker.
139
140
140
141
| Property | Description | Type | Default | Version |
141
142
| --- | --- | --- | --- | --- |
142
-
| format | To set the date format, refer to [dayjs](https://day.js.org/)|string|`YYYY`||
143
+
| format | To set the date format, refer to [dayjs](https://day.js.org/)|[formatType](#formatType)|`YYYY`||
143
144
144
145
### DatePicker\[picker=quarter]
145
146
146
147
| Property | Description | Type | Default | Version |
147
148
| --- | --- | --- | --- | --- |
148
-
| format | To set the date format, refer to [dayjs](https://day.js.org/)|string|`YYYY-\QQ`||
149
+
| format | To set the date format, refer to [dayjs](https://day.js.org/)|[formatType](#formatType)|`YYYY-\QQ`||
149
150
150
151
### DatePicker\[picker=month]
151
152
152
153
| Property | Description | Type | Default | Version |
153
154
| --- | --- | --- | --- | --- |
154
-
| format | To set the date format, refer to [dayjs](https://day.js.org/)|string|`YYYY-MM`||
155
+
| format | To set the date format, refer to [dayjs](https://day.js.org/)|[formatType](#formatType)|`YYYY-MM`||
| Property | Description | Type | Default | Version |
160
161
| --- | --- | --- | --- | --- |
161
-
| format | To set the date format, refer to [dayjs](https://day.js.org/)|string|`YYYY-wo`||
162
+
| format | To set the date format, refer to [dayjs](https://day.js.org/)|[formatType](#formatType)|`YYYY-wo`||
162
163
163
164
### RangePicker
164
165
@@ -169,7 +170,7 @@ The following APIs are shared by DatePicker, RangePicker.
169
170
| defaultPickerValue | To set default picker date |\[[dayjs](https://day.js.org/), [dayjs](https://day.js.org/)]| - ||
170
171
| disabled | If disable start or end |\[boolean, boolean]| - ||
171
172
| disabledTime | To specify the time that cannot be selected | function(date: dayjs, partial: `start`\|`end`) | - ||
172
-
| format | To set the date format, refer to [dayjs](https://day.js.org/). When an array is provided, all values are used for parsing and first value is used for formatting | string \| string\[]|`YYYY-MM-DD HH:mm:ss`||
173
+
| format | To set the date format, refer to [dayjs](https://day.js.org/)|[formatType](#formatType)|`YYYY-MM-DD HH:mm:ss`||
| renderExtraFooter | Render extra footer in panel | v-slot:renderExtraFooter="mode" | - ||
175
176
| separator | Set separator between inputs | string \| v-slot:separator|`<SwapRightOutlined />`||
@@ -185,6 +186,17 @@ The following APIs are shared by DatePicker, RangePicker.
185
186
| change | a callback function, can be executed when the selected time is changing | function(dates: \[dayjs, dayjs]\|\[string, string], dateStrings: \[string, string]) |||
186
187
| ok | callback when click ok button | function(dates: \[dayjs, dayjs]\|\[string, string]) |||
| format | 设置日期格式,为数组时支持多格式匹配,展示以第一个为准。配置参考 [dayjs](https://day.js.org/docs/zh-CN/display/format),支持[自定义格式](#components-date-picker-demo-format)|[formatType](#formatType)|`YYYY-MM-DD`||
0 commit comments