Forums

Datetimepicker specific period of time

grease082 13 Jul, 2010
Hi...

I've installed the chronoforms, and I wanted to make a Form in which I can choose with the date time picker two dates and the period of this two dates should be checked if it is in the main period.

For example, an appartement is only available in june, july and august. I will choose a date for example 4. july 2010 to 11. july 2010 and then I can book and i can send the formular to an e-mail adress, when i choose a date in January I can't send the formular and an error message appears which inform me to choose a date in june, july or august.

Is this possible? And if yes, how can i do this?

Thank you
GreyHead 14 Jul, 2010
Hi grease082,

Yes, it's possible with a custom datepciker. There are a couple of examples here - but from last year some time. Try searching on 'aeron'.

The docs for the datapicker are here and you'll see that you can (a) set up linked datepickers and (b) use the 'blocked' parameter to disable certain dates so that you could make sure tha tonly valid dates can be picked.

Alternatively you could do all the validation in a serverside validation script using PHP.

Bob
grease082 19 Oct, 2010
Yes, but where do I have to put the code in that it works?
I know understand how to block dates, but I don't know how to use it.

Can anybody help me?
GreyHead 19 Oct, 2010
Hi grease082,

Please see ths post for one example. There are several more if you search the forums.

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