Forums

Can we restrict dates available in Calendar?

pattaya2000 18 Jan, 2010
Hi

Is it possible to restrict the dates that people can choose from the calendar when using the form?
I'd like them to be able to choose only any date starting from tomorrow (based on the current time in Thailand)*

This would enable me to provide the calendar for customers to choose their delivery date. At the moment, I'm giving them a blank text field for them to type into

* my hosting server is in the US

Thanks in advance

Simon
Tolwyn 24 Jan, 2010
Hi!

Its relativly simple.
You have to edit the file calendar2.js found in \components\com_chronocontact\js
An documentation can be found at http://electricprism.com/aeron/calendar/#manual
You can also block specific dates like holidays or similar.

I was so proud of myself that I found all of this out by myself.🙂
Hope it helps.

best regards
tolwyn

happy editing

My site
http://www.rps-it.de
GreyHead 24 Jan, 2010
Hi Tolwyn,

You can usually do the same by entering the parameters in the box on the Form General tab (down at the bottom) without any need to edit the js file.

Bob
Tolwyn 26 Jan, 2010
Hi Grayhead!

Thanks, I didnt see that(obviously :-)). It's simpler that way. On the other hand, so I can create some files with different setting, e.g my personal Holidays etc. and upload them at the right time. I even wondered sometimes if I should write an editor to create them. Oh well, if I've got the time.

best regard
tolwyn
marald 15 Feb, 2010

Hi Tolwyn,

You can usually do the same by entering the parameters in the box on the Form General tab (down at the bottom) without any need to edit the js file.

Bob



Hi Bob,

how would I accomplish this?

I have a website with several forms, on some of the forms the user should only be allowed to pick tuesday's and wednesdays, but on the other form only weekends, and another form to choose their date freely.

Can you give an example what I should fill in on the general tab on the bottom?

regards,
Marald Bes
GreyHead 15 Feb, 2010
Hi Marald,

There are some examples already in the box on the General tab; please take a look. And the documentation for the other properties is on the page that Tolwyn linked to.

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