user2025036
user2025036

Reputation: 1

Datepicker should display dates from the next month only..Restrict current month dates to be unselectable

I have a following requirement: the datepicker should display dates starting from next month.

For example if current month is january, then it should display dates from first day of February and if it is February it should display dates from 1st of March. In all conditions the current month dates should be unselectable or hidden.

Plz help me how can i acheive this functionality?

Upvotes: 0

Views: 1850

Answers (2)

legendofawesomeness
legendofawesomeness

Reputation: 2911

Here is what you need to do:

$(document).ready(function() {
    $("#dateThis").datepicker({minDate: "+1M"});
});

Working fiddle.

Upvotes: 0

Paul Alan Taylor
Paul Alan Taylor

Reputation: 10680

The jQuery date picker supports this functionality out of the box.

http://jqueryui.com/datepicker/#min-max

Upvotes: 1

Related Questions