Skip to content

DatePicker

Basic usage

Choose Time

Bordered-less

Disabled

Size

Suffix

DatePicker API

DatePicker Attributes

NameDescriptionTypeDefaultVersion
value(v-model)Binding valuedayjs
open(v-model)Whether to popup panelbooleanfalse
modeSet picker typedate | week | month | quarter | yearfalse
placeholderThe placeholder of date inputstring | [string, string]请选择时间
disabledDetermine whether the DatePicker is disabledbooleanfalse
disabledDateSpecify the date that cannot be selected(currentDate: dayjs) => boolean
sizeSizelarge | default | small
readonlySet the readonly attribute of the input tagbooleanfalse
allowClearWhether to show clear buttonbooleanfalse
borderedWhether has border stylebooleanfalse
showNowShowNowbooleantrue
formatTo set the date formatstringYYYY-MM-DD
valueFormatformat of binding valuestring date formatsYYYY-MM-DD
showTimeTo provide an additional time selectionObject | booleanTimePicker Options
showTodayWhether to show Today buttonbooleantrue

DatePicker Events

NameDescriptionType
changea callback function, can be executed when the selected time is changing(time: dayjs | string) => void
openChangea callback function which will be called while panel opening/closing(open: boolean) => void

DatePicker Slots

NameDescription
renderExtraFooterCalled from time picker panel to render some addon to its bottom
suffixIconThe custom suffix icon

Contributors

lazy

ChangeLog

075de - fix: 修复date-picker报错 on 12/9/2024
0efb5 - fix: 修正日期时间选择器交互效果 on 1/10/2024
ae3d4 - fix: 修复年份显示不正确 on 1/4/2024
5cd34 - feat: date-picker on 1/2/2024

Released under the MIT License.