Skip to content

Commit

Permalink
修改yearPanel中的disabled显示试图的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
l30053176 committed Jul 24, 2024
1 parent c8b9c0a commit f9898df
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/PickerPanel/YearPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,9 @@ export default function YearPanel<DateType extends object = any>(
const startDate = generateConfig.setDate(startMonth, 1);

// End
const endMonth = generateConfig.setMonth(
currentDate,
generateConfig.getMonth(currentDate) + 1,
);
const enDate = generateConfig.addDate(endMonth, -1);

return disabledDate(startDate, disabledInfo) && disabledDate(enDate, disabledInfo);
const endMonth = generateConfig.setMonth(currentDate, 11);
const endDate = generateConfig.addDate(endMonth, 31);
return disabledDate(startDate, disabledInfo) && disabledDate(endDate, disabledInfo);
}
: null;

Expand Down

0 comments on commit f9898df

Please sign in to comment.