在触发事件flatpickr
时,我找不到将时间选择事件与日历事件区分开来的方法。onChange
const instance = flatpickr(flatpickrRef.current, {
mode: 'range',
enableTime: true,
time_24hr: true,
defaultDate: defaultDate as unknown as number,
disable: [
date => {
return date > new Date();
},
],
positionElement: positionElementRef.current,
onClose,
onChange,
});