结束时间不能超过上午 5:59,例如“22:00”开始和“13:00”结束,因为这是不可能的。24 小时是从(6:00 AM - 5:59 AM)
如何获得解决方案..请帮助
var ms = document.getElementById("<%= txtmonstart.ClientID %>").value;
var me = document.getElementById("<%= txtmonend.ClientID %>").value;
var start = ms.substring(0, ms.indexOf(":"));
var end = me.substring(0, me.indexOf(":"));
if (end >= 6 && start < end || start < 6 && end >= 6) {
alert("The end time for a shift cannot be beyond 5:59 AM. Please split this shift accordingly.");
}