min value for date fields

?
Guest 04 Sep, 2011
hi all,

I am working on a form with 2 date fields: date_from & date_to

date_from should have min date = today (no historic dates)
date_to should have min date = date_from + 1 day

element date_from: Field Class: date_picker_1, both required checkboxes are ticked
element date_to: Field Class: date_picker_2

I thought it might work following your instructions at the very bottom of this thread:
http://chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=26&t=21390

I have added a load js and a custom datepicker to the onLoad. only I am not getting things to work at all. would you mind some hints pls? is it the appropriate approach at all?
Max_admin 09 Sep, 2011
Hi Gabriela,

you only need a custom datepicker action, you know how to use this ? and you need V4 Rc2.0


you need this code in the configuration box:


minDate: { date: <?php echo date("d-m-Y"); ?>, format: 'd-m-Y' }


Please check the PHP date function syntax to customize the date and mke sure it matches the "format" parameter.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.