How to set hourMin, miniteMin values dynamically for jquery ui time picker, like if date is today i want allow the user to select only above the current time & if date is greater than current date then allow user to select from 0 - 23 hours.
i tried this code but not working
$('#test1').timepicker({
hourMin: 0,
hourMax: 23
});
$("#test").datepicker({
dateFormat: 'dd/mm/yy',
onSelect:function(selectedDate){
if(selectedDate == $.datepicker.formatDate('dd/mm/yy', new Date())){
$('#test1').timepicker('option','hourMin', new Date().getHours());
}else{
$('#test1').timepicker('option','hourMin', 0);
}
}
});
If there is any problem with this plugin can anybody suggest best plugin which suit my requirement.