mirror of https://github.com/ElemeFE/element
DatePicker: fix issue21163 日期选择器周开始时间为周五时跨年显示问题
parent
6bbc046563
commit
3a8699a162
|
@ -179,7 +179,7 @@ const TYPE_VALUE_RESOLVER_MAP = {
|
|||
let week = getWeekNumber(value);
|
||||
let month = value.getMonth();
|
||||
const trueDate = new Date(value);
|
||||
if (week === 1 && month === 11) {
|
||||
if (week === 1 && month === 11 || week > 50 && month === 0) {
|
||||
trueDate.setHours(0, 0, 0, 0);
|
||||
trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue