SankhaUI / jquery-datepicker

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

Need a way to disable all days except Fri & Sat #348

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is not an issue but something i would like to know how to do. I wasnt sure 
where to pose this, so am using this form for now.

Thanx for the wonderful tool provided. I was wondering if it were possible to 
disable selection of all days except Fri and Sat in the calendar such that when 
a user clicks on the input field to activate the datepicker, he should only be 
able to select either a Friday or a Saturday in the calendar and not any other 
day of the week. 

If possible, please advise the code ... Thanking you!!!

Chris.

Original issue reported on code.google.com by chrislop...@gmail.com on 23 May 2012 at 2:34

GoogleCodeExporter commented 9 years ago
This should give you a clue:

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

Rather than testing thisDate.isWeekend() you would say something like:

  if (thisDate.getDay() != 4 && thisDate.getDay() != 5) {

Original comment by kelvin.l...@gmail.com on 23 May 2012 at 3:29