Open Kakoola opened 10 months ago
2.15.14
120.0.6099.130
2.7.16
https://codepen.io/pen
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')
设置firstDayOfWeek为2或者3,日期选择正常,不会顺延7天
设置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
![Uploading 11.png…]()
将查看问题
I have the same issue
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