Skip to content

Commit

Permalink
fix(datepicker): fix DatePicker week multiple judgment
Browse files Browse the repository at this point in the history
  • Loading branch information
HaixingOoO committed Dec 17, 2024
1 parent b4c3a0b commit 353f997
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/date-picker/base/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ const DatePickerTable = (props: DatePickerTableProps) => {
const multipleWeekRowClass = (value: DateMultipleValue, targetDayjs: Dayjs) => {
if (mode !== 'week' || (Array.isArray(value) && !value.length)) return {};

const isSomeYearWeek = multipleValueYearWeek.some(
(item) => item.year === targetDayjs.year() && item.week === targetDayjs.week(),
);
const isSomeYearWeek = multipleValueYearWeek.some((item) => item.week === targetDayjs.week());
return {
[`${classPrefix}-date-picker__table-${mode}-row--active`]: isSomeYearWeek,
};
Expand Down

0 comments on commit 353f997

Please sign in to comment.