Skip to content

Commit

Permalink
fix(DatePicker): optimize date range picker panel initial render result
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn committed Dec 31, 2024
1 parent 2259875 commit 4a93a61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/date-picker/DateRangePickerPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default defineComponent({
}
month.value = nextMonth;
// 月份季度选择时需要确保右侧面板年份比左侧大
if ((props.mode === 'month' || props.mode === 'quarter') && year.value[0] === year.value[1]) {
if (['month', 'quarter'].includes(props.mode) && year.value[0] === year.value[1]) {
year.value = [year.value[0], year.value[0] + 1];
}
}
Expand Down

0 comments on commit 4a93a61

Please sign in to comment.