fix: use get_datetime_as_string with correct time format

This commit is contained in:
lukas.brandhoff
2024-10-30 11:46:21 +00:00
parent 46c96f6e95
commit 0c83f48f78
2 changed files with 3 additions and 4 deletions

View File

@@ -356,7 +356,7 @@ var calculate_end_time = function (frm, cdt, cdn) {
if (child.hours) {
d.add(child.hours, "hours");
frm._setting_hours = true;
frappe.model.set_value(cdt, cdn, "to_time", d.format(frappe.defaultDatetimeFormat)).then(() => {
frappe.model.set_value(cdt, cdn, "to_time", frappe.datetime.get_datetime_as_string(d)).then(() => {
frm._setting_hours = false;
});
}