{
field: 'field',
label: '定时更新',
component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm:ss',
disabledDate: (current: Dayjs) => {
return current && current < moment().subtract(1, 'days'); //当天之前的不可选,不包括当天
},
disabledTime: () => {
return {
// disabledHours: () => range(0, 24).splice(4, 20),
// disabledMinutes: () => range(30, 60),
// disabledSeconds: () => [55, 56],
};
},
showTime: { defaultValue: dayjs('00:00:00', 'HH:mm:ss') },
},
},
VbenAdmin antd日期选择器禁止选择当天之后的时间操作
最新推荐文章于 2024-04-25 15:26:05 发布