修改时间组件与报错
This commit is contained in:
@@ -50,7 +50,9 @@ const DialogCalendarCard: React.FC<DialogCalendarCardProps> = ({
|
||||
const minute = value[1] as number
|
||||
setSelectedHour(hour)
|
||||
setSelectedMinute(minute)
|
||||
const finalDate = new Date(dayjs(selected).format('YYYY-MM-DD') + ' ' + hour + ':' + minute)
|
||||
const hours = hour.toString().padStart(2, '0')
|
||||
const minutes = minute.toString().padStart(2, '0')
|
||||
const finalDate = new Date(dayjs(selected).format('YYYY-MM-DD') + ' ' + hours + ':' + minutes)
|
||||
if (onChange) onChange(finalDate)
|
||||
}
|
||||
onClose()
|
||||
@@ -101,6 +103,7 @@ const DialogCalendarCard: React.FC<DialogCalendarCardProps> = ({
|
||||
}
|
||||
}, [type, pendingJump])
|
||||
|
||||
console.log([selectedHour, selectedMinute], 'selectedHour, selectedMinute');
|
||||
|
||||
return (
|
||||
<CommonPopup
|
||||
|
||||
Reference in New Issue
Block a user