I need to disable future dates for my end date in joomla.
<?php echo JHTML::calendar('','enddate','enddate','%Y-%m-%d'); ?>
Any idea...
- "Need to hide future dates"
It is not possible using the Calendar field. http://docs.joomla.org/Calendar_form_field_type
Even if it was possible, users could easily manually type in a date in the future in the field as the calendar pop-up simply fills out a text field that is then submitted with the rest of the form. Even if that was locked people could easily hack it using Firebug or similar.
I think the correct implementation is to validate the selected date after entering and throw an error if it is in the future and then do something similar in PHP to avoid users manipulating the submitted data.