CF6 Disable previous dates in calendar?

disable past dates in a ChronoForms 6 calendar field.

Overview

The issue occurs when trying to use custom JavaScript code from CF5, which is not the correct method in CF6.
Navigate to the Calendar field settings, go to the Advanced tab, and set the start date option to the provided dynamic date format.

Answered
ev evilsnoop 05 Sep, 2017
How can I disable the past dates on the calendar? I can not seem to get this to work in CF6. In version CF5 in the setup section I was able to drag a Load JavaScript to the On Load area where I place this code and got it working:

jQuery(document).ready(function($){
$("#AppointmentDate").data("start_date", '<?php echo date("d-m-y", strtotime('+0 days')); ?>');
});

But now in CF6 I try using the same code in a custom code in the setup area and it did not work, I also try putting the code in the JavaScript box in the design area and ticked the Add inside domready event, which did not work.

Any help will be great.
Max_admin Max_admin 06 Sep, 2017
Answer
Hi evilsnoop,

In v6 under the Calendar field settings > Advanced > start date, use this:
{date:Y-m-d}


Best 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.