Issue with using moment JS in custom script for Time comparision

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?

var currentTime= moment('11:00p', "HH:mm a");
var startTime = moment('06:00p', "HH:mm a");
var endTime = moment('03:30a', "HH:mm a");

currentTime.isAfter(endTime) && currentTime.isBefore(startTime); //false
currentTime.isAfter(startTime) && currentTime.isBefore(endTime); //false

Not able to use above isAfter() format in custom scripts. Any Idea