如何在bootstrap3 datepicker中设置minDate?

时间:2017-01-10 11:05:56

标签: twitter-bootstrap-3 datepicker

$(“#txtdatefrom”)。datepicker({format:'dd / mm / yyyy',minDate:moment(),todayHighlight:true})

1 个答案:

答案 0 :(得分:0)

$(function () {
    $('#datepicker').datepicker({
        dateFormat: 'yy-mm-dd',
        showButtonPanel: true,
        changeMonth: true,
        changeYear: true,
        yearRange: '1999:2012',
        showOn: "button",
        buttonImage: "images/calendar.gif",
        buttonImageOnly: true,
        minDate: new Date(1999, 10 - 1, 25),
        maxDate: '+30Y',
        inline: true
    });
});