Browse Source

fix: consider now datetime if the default value is now for datetime field

(cherry picked from commit 5bbb9b42e1)
version-14
phot0n 2 years ago
committed by Mergify
parent
commit
b42013c539
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      frappe/public/js/frappe/form/controls/datetime.js

+ 2
- 0
frappe/public/js/frappe/form/controls/datetime.js View File

@@ -7,6 +7,8 @@ frappe.ui.form.ControlDatetime = class ControlDatetime extends frappe.ui.form.Co
return; return;
} else if (value === "Today") { } else if (value === "Today") {
value = this.get_now_date(); value = this.get_now_date();
} else if (value.toLowerCase() === "now") {
value = frappe.datetime.now_datetime();
} }
value = this.format_for_input(value); value = this.format_for_input(value);
this.$input && this.$input.val(value); this.$input && this.$input.val(value);


Loading…
Cancel
Save