Skip to content

Commit

Permalink
feat: 优化面板月份展示 (#1180)
Browse files Browse the repository at this point in the history
  • Loading branch information
honkinglin authored Jul 8, 2022
1 parent a3dccec commit 97d8830
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/date-picker/DateRangePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default defineComponent({
) as string[];

// 确保右侧面板月份比左侧大 避免两侧面板月份一致
if (value.value.length === 2) {
if (value.value.length === 2 && !props.enableTimePicker) {
const nextMonth = value.value.map((v) => dayjs(v).month());
if (year[0] === year[1] && nextMonth[0] === nextMonth[1]) {
nextMonth[0] === 11 ? (nextMonth[0] -= 1) : (nextMonth[1] += 1);
Expand Down

0 comments on commit 97d8830

Please sign in to comment.