fix: prevent duration field from opening when set to read only (#34517)

This commit is contained in:
Marc 2025-11-09 16:06:14 +01:00 committed by GitHub
parent 4914d6614d
commit f02c0060ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -103,6 +103,7 @@ frappe.ui.form.ControlDuration = class ControlDuration extends frappe.ui.form.Co
});
this.$input.on("focus", () => {
if (this.df.read_only) return;
this.$picker.show();
let is_picker_set = this.is_duration_picker_set(this.inputs);
if (!is_picker_set) {