engineer9090909090909090 / jquery-datepicker

Automatically exported from code.google.com/p/jquery-datepicker
0 stars 0 forks source link

Remove specific dates #232

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi Kevin,

No issue just a question. Can you remove specific dates from the calendar? For 
instance say I want to block off Aug. 13 when today is Aug. 12. Is there a way 
to add class="disabled" to a specific date?

Thanks and great work
Chris

Original issue reported on code.google.com by atseadesign@gmail.com on 12 Aug 2010 at 6:41

GoogleCodeExporter commented 8 years ago
Sure! Just use a renderCallback like in this example:

http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerCustomCellR
ender.html

Except rather that testing "if (thisDate.isWeekend())" you could test something 
like "if (thisDate.asString() == (new Date()).addDays(1).asString())" (assuming 
you always wanted tomorrow to be blocked).

Original comment by kelvin.l...@gmail.com on 12 Aug 2010 at 9:13