Link to home
Start Free TrialLog in
Avatar of newBieProgram
newBieProgram

asked on

JQuery help with datepicker - minDate

How can I modify this script to "block" current date in my calendar datepicker popup?  I don't want users to pick the current date for my appointment application, ie., no same-day appointments allowed.  I'm modifying existing code and do not know javascript well.

$(document).ready(function() {
    $(#div_date").hide();
});

$(function () {
    $(#apptDate").datepicker({ beforeShowDay: $.datepicker.noWeekends}
  );
     $("#date_pickup_icon").click(function () {
        $("#apptDate").datepicker("show");
     });
});

_____________________
I use the jquery library.  There is an attribute (excuse the incorrect terminology); "minDate".  Default is NULL.  How do I use this to specify the blocking of the current date and previous dates.
Avatar of KevinSchmaltz
KevinSchmaltz
Flag of United States of America image

I think you want to set the mindate equal to 1 check out the link below:

http://stackoverflow.com/questions/3247656/jquery-ui-datepicker-disable-todays-date-if-today-is-monday
ASKER CERTIFIED SOLUTION
Avatar of brendonfeeley
brendonfeeley
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of newBieProgram
newBieProgram

ASKER

I will try this. Thank you.
Yes, it worked.  I set the minDate to +1.  Thank you!  Very much appreciated!