pull/79/merge
yimijianfang 2021-05-22 13:41:21 -07:00 committed by GitHub
commit 0663334bd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 0 deletions

View File

@ -1933,6 +1933,24 @@
});
isOut = timestrap.now < timestrap.min || timestrap.now > timestrap.max;
//禁止选择日期
let notAllowDays = options.notAllowDays;
if (notAllowDays != undefined && notAllowDays.length != 0) {
var isMatch = notAllowDays.some(function (day) {
return new Date(day + ' 00:00:00').getTime() == timestrap.now;
})
if (isMatch) {
isOut = isMatch;
}
}
//允许选择日期
let allowDays = options.allowDays;
if (allowDays != undefined && allowDays.length != 0) {
var isMatch = allowDays.some(function (day) {
return new Date(day + ' 00:00:00').getTime() == timestrap.now;
})
isOut = !isMatch || isOut;
}
elem && elem[isOut ? 'addClass' : 'removeClass'](DISABLED);
return isOut;
};