better date validation, date-picker style updates

This commit is contained in:
Jarrod Flesch
2020-09-08 15:11:18 -04:00
parent ca24263c17
commit 8a8222995f
2 changed files with 51 additions and 13 deletions

View File

@@ -115,7 +115,7 @@ const optionsToValidatorMap = {
return true;
},
date: (value, options = {}) => {
if (value && value instanceof Date) {
if (value && !isNaN(Date.parse(value.toString()))) { /* eslint-disable-line */
return true;
}