DatePicker: fix issue21163 日期选择器周开始时间为周五时跨年显示问题

pull/21164/head
liuna 2021-07-19 20:22:44 +08:00
parent 6bbc046563
commit 3a8699a162
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 > 50 && month === 0) {
trueDate.setHours(0, 0, 0, 0);
trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
}