jonthornton/Datepair.js

How do I make it not possible to select dates before the current one?

Closed this issue · 3 comments

How do I make it not possible to select dates before the current one?

im using this :
" $('#start_date').on('change', function() {
var start_date = $('#start_date').datepicker('getDate');
var now = new Date();
if (start_date < new Date()) {
console.log(start_date, now);
}
});
"
but I hope there is a function that does it in a simple option in $ ('# dateEvent .date'). datepicker ({/ * here * / });

thanks

I'm not sure I understand the functionality you're trying to achieve. Can you give an example?

in the datepicker of the month, if today is March 8, I want it impossible to select March 7 or days before, is there an option to disable those days?

No, you'll need to code that up manually.