chore: input-year 对超出范围的年份置灰显示 (#3708)

This commit is contained in:
吴多益 2022-03-08 10:22:44 +08:00 committed by GitHub
parent bf8379026e
commit d7006446ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,10 +75,6 @@ export class CustomYearsView extends React.Component<CustomYearsViewProps> {
.clone()
.set({year: year, month: irrelevantMonth, date: irrelevantDate});
// Not sure what 'rdtOld' is for, commenting out for now as it's not working properly
// if ( i === -1 | i === 10 )
// classes += ' rdtOld';
noOfDaysInYear = parseInt(currentYear.endOf('year').format('DDD'), 10);
daysInYear = Array.from({length: noOfDaysInYear}, function (e, i) {
return i + 1;
@ -95,6 +91,9 @@ export class CustomYearsView extends React.Component<CustomYearsViewProps> {
if (selectedDate && selectedDate.year() === year) classes += ' rdtActive';
// 第一个和最后一个置灰
if (i === -1 || i === 10) classes += ' text-muted';
props = {
'key': year,
'data-value': year,