Disable date on datepicker

labbyjoel 11 Oct, 2012
Hi !

I'm using Joomla 2.5.1, Chronoform 4.0 RC3.11 and datepicker 1.17

I'm looking for a way to disable some date on the datePicker.

For example in one calendar I want to disable all Mon, tue, Wed, thu to allow only the user to select fridays, saturdays, sundays.

Chronoform is already used in another part of the website, so I cannot just tweek the code.

Is anybody have an idea ?

Thanks for your help !

joe

ps: I saw this post that treat exactly what I try to implement, but it's jquery
http://davidwalsh.name/jquery-datepicker-disable-days
GreyHead 11 Oct, 2012
Hi joe,

I have an experimental forked version of the datepicker that allows you to select days of the week. If you are happy to try it you can get it here

Added a new option 'weekdays' that takes an optional array of day
numbers e.g. [0,3,4]. If the array is present then the available dates
are limited to the days in the array.


Bob

PS I see you already found it :-)
GreyHead 11 Oct, 2012
Hi joe,

There was some kind of a problem with the GitHub repository that was beyond my wit to fix so I've nuked it and created a new copy. I'll update the code again later today. If you've already got a copy that should be OK.

Bob
labbyjoel 12 Oct, 2012
Thank you bob ! My case is resolved !! :-)

Thanks

joe
GreyHead 18 Oct, 2012
Hi,

For other readers: the Github repository is back up and the modified datepicker code is in the weekdays branch here

Bob
This topic is locked and no more replies can be posted.