jQuery DatePicker Min Max dates

前端 未结 6 1795
春和景丽
春和景丽 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 01:59

    You can also use specific date ranges. I added a min beginning date with a +14D max. You just need to remember to stay consistent with your date format and use "/" instead of "-" between MM/DD/YYYY.

    $('#Date').datepicker({
      changeMonth: true,
      minDate: '10/19/2016',
      maxDate: '+14D',
    });

提交回复
热议问题