Просмотр исходного кода

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

(cherry picked from commit 5bbb9b42e1)
version-14
phot0n 2 лет назад
committed by Mergify
Родитель
Сommit
b42013c539
1 измененных файлов: 2 добавлений и 0 удалений
  1. +2
    -0
      frappe/public/js/frappe/form/controls/datetime.js

+ 2
- 0
frappe/public/js/frappe/form/controls/datetime.js Просмотреть файл

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


Загрузка…
Отмена
Сохранить