Skip to content

Commit

Permalink
fix: Handle empty value of datetime control
Browse files Browse the repository at this point in the history
(cherry picked from commit 64e37ec)
  • Loading branch information
surajshetty3416 authored and mergify[bot] committed Apr 4, 2024
1 parent 2ac55a3 commit 291ab66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frappe/public/js/frappe/form/controls/datetime.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ frappe.ui.form.ControlDatetime = class ControlDatetime extends frappe.ui.form.Co
}

get_start_date() {
this.value = this.value == null ? undefined : this.value;
this.value = this.value == null || this.value == "" ? undefined : this.value;
let value = frappe.datetime.convert_to_user_tz(this.value);
return frappe.datetime.str_to_obj(value);
}
Expand Down

0 comments on commit 291ab66

Please sign in to comment.