Any suggestions on how to get the hours and minutes individually from this format 'hh:mm' using JavaScript?
<input type="time" id="timepicker" onchange="timePassed(this.value)">
<script>
function timePassed(time) {
var hours;
var mins;
//todo: get the hours and minutes from the input value and store them in separate variables
}
</script>
I tried using getHours() and getMinutes() but it seems to not work on hh:mm formats