jQuery datepicker mindate, maxdate

♀尐吖头ヾ 提交于 2019-11-29 03:08:23
$("#datepick").datepicker({
            changeMonth: true,
            changeYear: true,
            showOn: 'button',
            buttonImage: 'images/calendar.gif',
            buttonImageOnly: true,
            dateFormat: 'dd/mm/yy',
            minDate: '-100Y',
    maxDate: '-1Y', 
    yearRange: '-100',

        });
Amra

I fixed my problem which it was the jquery libraries were a bit out date.

If anyone interested on this solution please check here.

Neil Aitken

The +30 years one should work fine as shown here:

For -120 years you just need to do the inverse here

To display from current date to 1 year = maxDate: '+1Y', To display from current date to 30 days = maxDate: '+30D',

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