Skip to content

Commit

Permalink
fix(DatePicker): 修复时间选中 提示背景展示问题 (#656)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuilanxin committed Mar 11, 2022
1 parent 7a14080 commit 997ffe1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-date-picker/src/index.tsx
Expand Up @@ -94,7 +94,7 @@ export default function DatePicker(props: DatePickerProps) {
}
setType(curType);
} else {
let currentDate = new Date(selectDate || selectPanelDate);
let currentDate = new Date(selectPanelDate);
let month = currentDate.getMonth();
if (curType === 'prev') {
month -= 1;
Expand All @@ -107,7 +107,7 @@ export default function DatePicker(props: DatePickerProps) {
onPanelChange && onPanelChange(new Date(currentDate), curType);
}
setSelectPanelDate(curType === 'today' ? today : currentDate);
setSelectDate(curType === 'today' ? today : currentDate);
curType === 'today' && setSelectDate(today);

setType('day');
}
Expand Down

0 comments on commit 997ffe1

Please sign in to comment.