Merge pull request #13157 from hrwX/patch-3

fix: parse Today default value for date docfield
This commit is contained in:
mergify[bot] 2021-05-12 06:24:10 +00:00 committed by GitHub
commit 0d0cb8b877
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,9 +13,11 @@ frappe.ui.form.ControlDate = frappe.ui.form.ControlData.extend({
this._super(value);
if (this.timepicker_only) return;
if (!this.datepicker) return;
if(!value) {
if (!value) {
this.datepicker.clear();
return;
} else if (value === "Today") {
value = this.get_now_date();
}
let should_refresh = this.last_value && this.last_value !== value;