Monday, 10 April 2017

Daterangepicker set min time


Date.prototype.addHours = function(h) {    
   this.setTime(this.getTime() + (h*60*60*1000)); 
   return this;   
}
var currDate = new Date().addHours(5); // 5 is the hours
 
$('#fromDate').daterangepicker({
 minDate: currDate,
 timePicker: true,  
 singleDatePicker: true, 
 timePickerIncrement: 1,
 format: 'DD/MM/YYYY hh:mm A'
});

No comments:

Post a Comment

Git merge branch to another branch

$ git checkout develop $ git pull $ git checkout test-branch $ git merge develop $ git push