Restrict date in datepicker up to 'today'

Martinmk 01 Sep, 2011
Hello,

a newbie with a probably simple question.
Is there a way to restrict the date in the datepicker so that the customer can choose only the dates up to today? I tried playing around with the maxDate settings in the datepicker config filed, but that only allows me to lock the datepicker to a certain timeframe, but what I want is just the future dates to be unselectable.
Any help would be apreciated
thank you in advence!
Martin
GreyHead 02 Sep, 2011
Hi Martin,

Not necessarily a simple question. The DatePicker in CFv4 is not so good in this area. Please see this post for some suggestions.

Note that Max has changed the DatePicker code since then though I think this will still work OK.

Bob
Martinmk 02 Sep, 2011
Thank you. That looked like it could do the trick. Unfortunately the poster said there is a bug and this JS doesn't work in Joomla 1.6. It's a shame.
Martin
GreyHead 10 Oct, 2011
Hi Martin,

I have written a post here which gets ChronoForms to work with a later version of the DatePicker that does not have the same problems with MooTools 1.3.

I haven't tried all the bells and whistles yet but minDate and maxDate are working with fixed dates and I think that they can be used fairly easily with variable dates and hopefully with the range problem that you have.

If you try it please do not use on a live site without testing and let me know about any problems you find.

I can't speak for Max but hopefully this or something very similar will find it's way into a forthcoming update of ChronoForms for Joomla! 1.6/1.7

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