I\'ve been playing with jquery and I\'ve run myself into a time problem. I\'ve got 3 time input select boxes, one for hours, one for minutes, and one for the Meridian. I need to
Example of tj111 suggestion:
$("#ConditionValue").val(
(
new Date(
"01/01/2000 " +
$("#EventCloseTimeHour option:selected").text() +
$("#EventCloseTimeMin option:selected").text() + ":00" +
" " +
$("#EventCloseTimeMeridian option:selected").text()
)
).toTimeString().slice(0,8))
;
Or you can use:
hour = hour %12 + (meridian === "AM"? 0 : 12);
hour = hour < 10 ? "0" + hour : hour;