0

This is my code:

$('#dp').datepicker(); $('#dp').datepicker( "setDate", "05/01/2013" ); $('#dp').datepicker("option", "minDate", "07/01/2013" ); 

Currently when I open the date picker I see the month of July 2013 since this is the minDate, however I would like to see the month of May 2013 and see all the dates for that month disabled (since the minDate is July 2013).

Is it possible to setDate to a month prior to the minDate?

1

1 Answer 1

1

Try this:

var d = $.datepicker.parseDate("mm/dd/yy", "07/01/2013"); $('#dp').datepicker({ beforeShowDay: function (date) { return [date >= d, '']; } }); $('#dp').datepicker("setDate", "05/01/2013"); 

jsFiddle example

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.