2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

fix: set time to 0 on date selection

This commit is contained in:
18alantom 2023-07-14 11:27:59 +05:30 committed by Alan
parent c78237a0d9
commit aeaddc30a4

View File

@ -112,9 +112,11 @@ export default defineComponent({
if (!(target instanceof HTMLInputElement)) {
return;
}
this.showInput = false;
let value: Date | null = new Date(target.value);
value.setHours(0, 0, 0, 0);
if (Number.isNaN(value.valueOf())) {
value = null;
}