Link to home
Create AccountLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

Setting the minDate and maxDate from the current date, using jQuery Date Picker

I need the value of the year to go back in time no more than 75 years, I assume I'd need to explicitly set the minDate to this year - 75.

Is that right? Where do I set that value?

Thanks!
SOLUTION
Avatar of zappafan2k2
zappafan2k2

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of curiouswebster

ASKER

Great. I presume your '#myElementId' is the same as my '#datepicker'?

How does this:
.datepicker({ minDate: '-75Y'});

 relate to the other coded needed to instantiate my control?

    $(function () {
        $("#datepicker").datepicker({
            changeMonth: true,
            changeYear: true
        });
    });
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Thanks!