We help IT Professionals succeed at work.

This min date is not working with jQuery UI Date Picker

curiouswebster
on
I would like the the allowed date to be from today back 75 years. I thhought this would work, but it does not.

    $(function () {
        $("#datepicker").datepicker({
            changeMonth: true,
            changeYear: true,
            minDate: '-75Y'
        });
    });

I am seeing 20 years in either direction.

Please correct this if you know the answer.

Thanks,
newbieweb
Comment
Watch Question

Multitechnician
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
work fine : http://jsfiddle.net/3tZ6y/

you probably overwrite the settings somewhere else...

for example :
$(".date").each(function()
    $(this).datepicker({ ... different settings overwritting the previous one ... });
curiouswebsterSoftware Engineer

Author

Commented:
Thanks!

Explore More ContentExplore courses, solutions, and other research materials related to this topic.