element icon indicating copy to clipboard operation
element copied to clipboard

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

Open Kakoola opened this issue 2 years ago • 4 comments

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 avatar Dec 27 '23 13:12 Kakoola

Uploading 11.png… image

Kakoola avatar Dec 27 '23 13:12 Kakoola

将查看问题

webvs2 avatar Jan 02 '24 03:01 webvs2

I have the same issue

milostimotic avatar Jan 11 '24 12:01 milostimotic