mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 11:58:10 +08:00
chore: input-year 对超出范围的年份置灰显示 (#3708)
This commit is contained in:
parent
bf8379026e
commit
d7006446ee
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user