Forums

Chronoform v5 Datepicker dynamic start and end dates

maartenvdbroeck 08 Oct, 2017
I tried to implement the Chronoform v5 Datepicker.
The datepicker itself shows up, but it's not possible to insert dynamic start and end dates.
Fixed start and end dates are working eg data-start_date=08-10-2017.
I followed the guidelines on https://www.chronoengine.com/faqs/70-chronoforms/cfv5/5216-date-control-using-cfv5-date-picker-element.
See also the attached Screenshots.

If i implement the php code in a custom html code, it shows exactly the same date as the fixed startdate.

<?php echo date("d-m-Y"); ?>
<?php echo date('d-m-').(date('Y')+1); ?>

It seems to me that the php code to get the data is not executed.

How can I get it to work?
GreyHead 08 Oct, 2017
Hi maartenvdbroeck ,

Please post a link to the form so I can take a quick look.

Bob
GreyHead 09 Oct, 2017
Hi Maarten,

If you look at the Form HTML for the first date-picker you will see that the start-date value is wrong:
data-start_date="08-10-2017data-end_date"
Somehow the two lines are getting merged together. You could try adding a blank line between them, or echo an &019; character return and see if that corrects the problem.

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