Skip to content

Commit a64d04b

Browse files
uyarntdesign-bot
andauthored
fix(DatePicker): fix date range picker end panel bug (#5901)
* fix(DatePicker): fix date range picker end panel bug * chore: stash changelog [ci skip] --------- Co-authored-by: tdesign-bot <[email protected]>
1 parent 09fce1e commit a64d04b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

packages/components/date-picker/components/panel/RangePanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export default defineComponent({
112112
!hidePreselection && props.hoverValue[1]
113113
? parseToDayjs(props.hoverValue[1], format.value).toDate()
114114
: undefined,
115-
year: props.year[1] - props.year[0] <= 9 ? props.year[1] + 9 : props.year[1],
115+
year: props.mode === 'year' && props.year[1] - props.year[0] <= 9 ? props.year[1] + 9 : props.year[1],
116116
month: props.month[1],
117117
mode: props.mode,
118118
firstDayOfWeek: props.firstDayOfWeek || globalConfig.value.firstDayOfWeek,
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
pr_number: 5901
3+
contributor: uyarn
4+
---
5+
6+
- fix(DatePicker): 修复 `1.15.3` 版本中日期范围选择面板年份错误的问题 @uyarn ([#5901](https://github.com/Tencent/tdesign-vue-next/pull/5901))

0 commit comments

Comments
 (0)