0

i want to disable a specific date from a specific month of every year in datepicker from Jquery Ui. for example: disable auguest(month) 15(date) of every year in datetime picker

Manuel Allenspach
  • 12,467
  • 14
  • 54
  • 76
  • Use `beforeShowDay`, eg. like this guy did -> http://stackoverflow.com/questions/23964662 – blgt Jun 03 '14 at 07:35

1 Answers1

4

Use the beforeShowDay option.

$("selector").datepicker({
    ...
    beforeShowDay: function(date) {
        var month = date.getMonth()+1; // +1 because JS months start at 0
        var day = date.getDate();
        return [!(month == 8 && day == 15), ""];
    }
});

DEMO

Barmar
  • 741,623
  • 53
  • 500
  • 612