jQuery DatePicker Min Max dates

前端 未结 6 1783
春和景丽
春和景丽 2020-12-07 01:22

I have the jQuery date picker setup and working but would like help with setting the minDate and maxDate options. My current code is below (without these options). How can

6条回答
  •  伪装坚强ぢ
    2020-12-07 02:16

    Your could try:

    var expdisp = $("#expdisp").attr("value");
    
    $("#expirydate" ).datepicker({
        showOn: "button",
        buttonImage: "images/calendar.gif",
        buttonImageOnly: true,
        dateFormat: "dd/mm/yy",
        defaultDate: expdisp,
        showOtherMonths: true,
        selectOtherMonths: true,
        changeMonth: true,
        changeYear: true,
    
        minDate: -3M,
        maxDate: +28D
    });
    

提交回复
热议问题