This commit is contained in:
2024-01-23 15:58:56 +08:00
parent 09e62c4304
commit 07f87bfb9d
7 changed files with 33 additions and 13 deletions

View File

@ -296,7 +296,8 @@ export class GridDateColumn extends GridColumn {
if (col.dateMax != null) {
date.max = col.dateMax;
}
date.addEventListener('change', trigger);
// date.addEventListener('change', trigger);
date.addEventListener('blur', trigger);
return date;
}
@ -324,6 +325,9 @@ export class GridDateColumn extends GridColumn {
}
static formatDate(date) {
return `${date.getMonth() + 1}/${date.getDate()}/${date.getFullYear()}`;
if (date instanceof Date && !isNaN(date)) {
return `${date.getMonth() + 1}/${date.getDate()}/${date.getFullYear()}`;
}
return '';
}
}