I want to disable past date while picking date in Bootstrap datepicker.
In the documentation(Bootstrap Datepicker), I didn't find exactly how to disable past date.
I tried something like these but it didn't work for me.
$(document).ready(function(){
var todayTmp=new Date();
var today=new Date(todayTmp.getFullYear(), todayTmp.getMonth(), todayTmp.getDate(), 0, 0, 0, 0);
$('#vDate').datepicker({
onRender: function(date){
return date.valueOf() < today.valueOf() ? 'disabled' : '';
}
});
});
How to fix it ?