How can I compare date/time values using the jQueryUI datepicker and HTML5 time input?
I want to validate that the "begin" date/time pair predates the "end" date/time pair on a page. I'm using the jQueryUI datepicker, and the HTML5 time input element/widget. This jQuery: var begD = $.datepicker.parseDate('mm/dd/yy', $('#BeginDate').val()); var endD = $.datepicker.parseDate('mm/dd/yy', $('#EndDate').val()); if (begD > endD) { alert('Begin date must be before End date'); $('#BeginDate').focus(); return false; } (see this script in context here: http://jsfiddle.net/clayshannon/QCrXG/9/ ) ...works for comparing the datepicker vals, but I need to incorporate the time elements too, so