问题
I'm using inline calendar of this jQuery inline datePicker plugin. By default the days before the current date was disabled. I want to enable them. Do you have any idea? http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/inlineDatePicker.html
$(function () {
$('.turn-me-into-datepicker').datePicker({inline:true})
.bind(
'dateSelected',
function (e, selectedDate, $td) {
console.log('You selected ' + selectedDate);
}
);
});
Under Html:
I've used the class name inside a div.
回答1:
You can just check out their documentation for the appropriate option or other live examples from their website.
Going back to the topic, using their demo example:
$('#inline-3')
.datePicker(
{
inline:true,
startDate:'01/01/2000' // first selectable date is 1st Jan 2000
}
);
回答2:
You need to make sure that the minDate option is null.
来源:https://stackoverflow.com/questions/9395842/how-to-enable-the-past-dates-of-jquery-inline-datepicker