How can I set the default Hours and minutes as "00:00". Here I want to set only time not date. I am using the following code for datetimepicker. In this code how can I set the default time as "00:00"?
$('#timepicker'+rowIndx).datetimepicker({
format : "dd/MM/yyyy hh:mm",
pickSeconds:false,
}).on("show",function(e) {
if($("#from_Date"+ rowIndx).val() == ""){ $('#timepicker'+rowIndx).datetimepicker("setDate", "");
}
}).on('changeDate', function(e) {
isExtraTcAmountDateChanged = "Y";
});
http://jsfiddle.net/7q26juzu/
Bootstrap datetimepicker uses moment library so make use of it like this,
Simplified version of @Freddy's answer.
startof
can take various arguments. More details in MomentJS documentation.