mirror of https://github.com/ElemeFE/element
DatePicker:fix weeknumber error
parent
473ef53f93
commit
a8240e03a1
|
@ -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 >= 52 && month === 0)) {
|
||||
trueDate.setHours(0, 0, 0, 0);
|
||||
trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue