feat(Calendar): allow default-date to be null (#7116)

This commit is contained in:
neverland
2020-09-05 15:22:40 +08:00
committed by GitHub
parent afb8ac5443
commit aefec84e14
4 changed files with 32 additions and 9 deletions
+4
View File
@@ -189,6 +189,10 @@ export default createComponent({
return 'disabled';
}
if (currentDate === null) {
return;
}
if (type === 'single') {
return compareDay(day, currentDate) === 0 ? 'selected' : '';
}