DatePicker
Basic usage
Choose Time
Bordered-less
Disabled
Size
Extra Footer
Suffix
DatePicker API
DatePicker Attributes
Name | Description | Type | Default | Version |
---|---|---|---|---|
value(v-model) | Binding value | dayjs | — | |
open(v-model) | Whether to popup panel | boolean | false | |
mode | Set picker type | date | week | month | quarter | year | false | |
placeholder | The placeholder of date input | string | [string, string] | 请选择时间 | |
disabled | Determine whether the DatePicker is disabled | boolean | false | |
disabledDate | Specify the date that cannot be selected | (currentDate: dayjs) => boolean | — | |
size | Size | large | default | small | — | |
readonly | Set the readonly attribute of the input tag | boolean | false | |
allowClear | Whether to show clear button | boolean | false | |
bordered | Whether has border style | boolean | false | |
showNow | ShowNow | boolean | true | |
format | To set the date format | string | YYYY-MM-DD | |
valueFormat | format of binding value | string date formats | YYYY-MM-DD | |
showTime | To provide an additional time selection | Object | boolean | TimePicker Options | |
showToday | Whether to show Today button | boolean | true |
DatePicker Events
Name | Description | Type |
---|---|---|
change | a callback function, can be executed when the selected time is changing | (time: dayjs | string) => void |
openChange | a callback function which will be called while panel opening/closing | (open: boolean) => void |
DatePicker Slots
Name | Description |
---|---|
renderExtraFooter | Called from time picker panel to render some addon to its bottom |
suffixIcon | The custom suffix icon |