[Wolves] Php datepicker calendar - choosing dates

Wayne Morris waynelists at machx.co.uk
Mon Mar 5 16:34:18 UTC 2012

On 05/03/2012 16:11, Chris Ellis wrote:
> Hi Wayne
> On 5 March 2012 15:57, Wayne Morris<waynelists at machx.co.uk>  wrote:
>> On 05/03/2012 15:44, David Goodwin wrote:
>>>> Can I overide the disabledays with a 'except these' or do i have to do it
>>>> some other way?
>>>> Also, can I add a 'you haven't changed calendar, have another go' else
>>>> they might just choose default.
>>>> cheers
>>> If I understand your question correctly, you could extend the TC_Calendar
>>> class, and define your own 'disabledDay' function … however, this will
>>> probably require you to read the source code of the parent (TC_Calendar)
>>> class and understand how it's working.
>>> David.
>>> _____________________
>> The TC_Calendar function seems to disable an entire column of the calendar,
>> so would probably require more fiddling with than I'm capable to re-enable
>> only certain dated.
>> but thanks.
> Why bother with any PHP, just use a Javascript based date picker.
> There will be
> many JQuery based things, a quick Google, for example:
>      http://jqueryui.com/demos/datepicker/
> That JQuery based picker, has an event: beforeShowDay which (based on the docs)
> would allow you to implement what ever day selection logic you need, eg:
>      $('.selector').datepicker({
>         beforeShowDay: function(date) { return [ false, 'booked', 'All
> days are booked!' ]; }
>      });
I've done nothing with javascript, but done enough to be dangerous with 
php, and needed the calendar function to replace a tedious 'enter your 
own box'
on an existing page, where i'd already got the code to submit it in my 
mysql database. Didn't want to have to work out how to get the js code 
to submit
it, tho that seems easier enough, the js in the datepicker I have is 
purely to pass it over, so seems trivial enough.
> Also, Javascript shares nothing with Java.  They are entirely separate
> and should
> never be confused.
i know... since I'd written 'javascript in full at one end of the 
sentence, i figured that people would work out I was being lazy at the 
other end and not typing it in full again ;-)

> Chris
Thanks, I'll look at that js calendar.

> _______________________________________________
> Wolves LUG mailing list
> Homepage: http://www.wolveslug.org.uk/
> Mailing list: Wolves at mailman.lug.org.uk
> Mailing list home: https://mailman.lug.org.uk/mailman/listinfo/wolves

More information about the Wolves mailing list