fix: handle input future birth date
This commit is contained in:
parent
a92e9ffdc1
commit
a716420de9
1 changed files with 2 additions and 1 deletions
|
|
@ -164,8 +164,9 @@ defineProps<{
|
|||
@update:model-value="
|
||||
(v) => {
|
||||
if (v && v.toString().length === 10) {
|
||||
const today = new Date();
|
||||
const date = parseAndFormatDate(v);
|
||||
birthDate = date;
|
||||
birthDate = date && date > today ? today : date;
|
||||
}
|
||||
if (v && v.toString().length === 0) birthDate = '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue