How do I make a slider range of hours from 00:00 to 23:59 with jquery ui?
Code:
$("#hora-range").slider({
range: true,
min: 0000,
max: 2359,
values: [0000, 2359],
slide: function(event, ui) {
$(".min-hora-label").html('HORA MIN= ' + ui.values[0]);
$(".max-hora-label").html('HORA MAX= ' + ui.values[1]);
}
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script><linkhref="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script><divid="hora-range"></div>
<div class="min-hora-label"></div>
<div class="max-hora-label"></div>