DatePicker:fix weeknumber error

pull/21616/head
weidehai 2022-01-09 16:52:51 +08:00
parent 473ef53f93
commit a8240e03a1
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}