日期范围选择组件
This commit is contained in:
@@ -48,7 +48,9 @@ const DialogCalendarCard: React.FC<DialogCalendarCardProps> = ({
|
|||||||
if (searchType === 'range') {
|
if (searchType === 'range') {
|
||||||
const delta = calculateMonthDifference(selected as Date, new Date(year, month - 1, 1))
|
const delta = calculateMonthDifference(selected as Date, new Date(year, month - 1, 1))
|
||||||
console.log('xxxxx', calendarRef.current)
|
console.log('xxxxx', calendarRef.current)
|
||||||
calendarRef.current?.gotoMonth(delta)
|
setTimeout(() => {
|
||||||
|
calendarRef.current?.gotoMonth(delta)
|
||||||
|
}, 50)
|
||||||
} else {
|
} else {
|
||||||
setSelected(new Date(year, month - 1, 1))
|
setSelected(new Date(year, month - 1, 1))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user