fix(employee): js error if user does not have write permission for date field (#55312)

This commit is contained in:
Himanshu Jain
2026-05-27 01:49:16 +05:30
committed by GitHub
parent 2a7867511d
commit 652014700c

View File

@@ -44,7 +44,7 @@ frappe.ui.form.on("Employee", {
},
refresh: function (frm) {
frm.fields_dict.date_of_birth.datepicker.update({ maxDate: new Date() });
frm.fields_dict.date_of_birth.datepicker?.update({ maxDate: new Date() });
if (!frm.is_new() && !frm.doc.user_id) {
frm.add_custom_button(__("Create User"), () => {