setting min date in jquery datepicker

Posted by user1184777 on Stack Overflow See other posts from Stack Overflow or by user1184777
Published on 2012-04-13T10:46:08Z Indexed on 2012/04/13 11:30 UTC
Read the original article Hit count: 341

Hi i want to set min date in my jquery datepicker to (1999-10-25) so i tried the below code its not working.

$(function () {
    $('#datepicker').datepicker({
        dateFormat: 'yy-mm-dd',
        showButtonPanel: true,
        changeMonth: true,
        changeYear: true,
        showOn: "button",
        buttonImage: "images/calendar.gif",
        buttonImageOnly: true,
        minDate: new Date(1999, 10 - 1, 25),
        maxDate: '+30Y',
        inline: true
    });
});

** if i change the min year to above 2002 than it will work fine but if i specify min year less than 2002{like above eexample 1999} it will show only up to 2002.can someone help me. i am using jquery-1.7.1.min.js and jquery-ui-1.8.18.custom.min.js.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui