How to enable the past dates of jQuery inline datePicker?

≡放荡痞女 提交于 2019-12-11 05:25:17

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!