ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.12k stars 14.64k forks source link

[Bug Report] DateTimePicker日期选择器设置firstDayOfWeek:3,导致部分月份日期选择后会顺延7天 #22784

Open Kakoola opened 10 months ago

Kakoola commented 10 months ago

Element UI version

2.15.14

OS/Browsers version

120.0.6099.130

Vue version

2.7.16

Reproduction Link

https://codepen.io/pen

Steps to reproduce

var Main = { data() { return { pickerOptions: { firstDayOfWeek:3, shortcuts: [{ text: '最近一周', onClick(picker) { const end = new Date(); const start = new Date(); start.setTime(start.getTime() - 3600 1000 24 7); picker.$emit('pick', [start, end]); } }, { text: '最近一个月', onClick(picker) { const end = new Date(); const start = new Date(); start.setTime(start.getTime() - 3600 1000 24 30); picker.$emit('pick', [start, end]); } }, { text: '最近三个月', onClick(picker) { const end = new Date(); const start = new Date(); start.setTime(start.getTime() - 3600 1000 24 * 90); picker.$emit('pick', [start, end]); } }] }, value1: '', value2: '' }; } }; var Ctor = Vue.extend(Main) new Ctor().$mount('#app')

What is Expected?

设置firstDayOfWeek为2或者3,日期选择正常,不会顺延7天

What is actually happening?

设置firstDayOfWeek为2或者3,日期选择正常,会顺延7天;例如:选择2023-08-06到2023-08-06实际显示的值是2023-08-13到2023-08-13,选择2022-02-06到2022-02-06实际显示的值是2022-02-13到2022-02-13

Kakoola commented 10 months ago

![Uploading 11.png…]() image

webvs2 commented 10 months ago

将查看问题

milostimotic commented 10 months ago

I have the same issue

Mrzhangqc commented 1 month ago

I have the same issue