In Employee Checkin Doc Type storing Time entered in the temp variable with Just Time (HH:mm:ss)
frm.set_value(“time_for_calculation”, moment(frm.doc.time).format(‘HH:mm:ss’));
Converting the Late thershold time as well in HH:mm:ss format
var cc_late_time = moment(r.message.late_arrival_timing).format(‘HH:mm:ss’);
The following check fails for when Therhold time is 09:00:00 and time for calculation is 10:00:00 (Its FALSE whereas it should be TRUE)
if (moment(frm.doc.time_for_calculation).isAfter(cc_late_time))
{
frappe.msgprint(“Late Entry”);
}
Anyone who have used moment.js in custom script can help?