I have a table with a single record which is used to manage an end date which is editable through a form.
This works fine and has a record as follows (unique ID part obscured):
This is called on a form in 2 places. First to display the end date on a booking form
The second time it is used to limit the last date that can be picked as follows in extra params:
Any Ideas why?
This works fine and has a record as follows (unique ID part obscured):
ID 1
uniq_id XXXXX97a2bbc25740c1e60632687716cc824c929
user_id 64
created 2015-01-14 07:30:43
modified 2016-03-03 16:42:21
latestdate 31-12-2017
input_submit_2 Amend Date
This is called on a form in 2 places. First to display the end date on a booking form
<?php
$db =& JFactory::getDBO();
$query = "
SELECT `latestdate`
FROM `#__chronoengine_chronoforms_datatable_HutBookingLimit`
WHERE `uniq_id` = 'XXXXX97a2bbc25740c1e60632687716cc824c929'";
$db->setQuery($query);
$d = $db->loadResult();
$Final_date = date( "F j, Y", strtotime( $d ) );
echo "<p style=\"font-size:14px; color:Red;font-weight:bold;\">We can not yet accept bookings after " . $Final_date. ".</p>";
?>
Which correctly displays "We can not yet accept bookings after December 31, 2017."
The second time it is used to limit the last date that can be picked as follows in extra params:
data-end_date=<?php
$db =& JFactory::getDBO();
$query = "
SELECT `latestdate`
FROM `#__chronoengine_chronoforms_datatable_HutBookingLimit`
WHERE `uniq_id` = 'XXXXX97a2bbc25740c1e60632687716cc824c929' ;
";
$db->setQuery($query);
$d = $db->loadResult();
echo $d;
?>
But the date picker stops at 31 12 2016 and all 2017 is greyed out
Any Ideas why?