Skip to content

Commit 40b32b6

Browse files
author
edencoder
committed
fix date submission
1 parent 6c482f0 commit 40b32b6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

bundles/form/fields/date.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,9 @@ export default class DateField extends Field {
9696
const checkDate = new Date(value);
9797

9898
// return value
99-
if (!isNaN(checkDate.getTime())) {
100-
// return parsed
101-
return {
102-
start : checkDate,
103-
};
99+
if (checkDate.getTime() && !isNaN(checkDate.getTime())) {
100+
// return no date
101+
return {};
104102
}
105103

106104
// try catch

0 commit comments

Comments
 (0)