I have a module that requires a date input and I have added this code at the top of my default template file:
// no direct access
defined('_JEXEC') or die;
JHTML::_('behavior.calendar');
$today = mktime(0, 0, 0, date("m") , date("d"), date("Y"));
$in2days = mktime(0, 0, 0, date("m") , date("d")+2, date("Y"));
I create the date field using the following code which worked in Joomla 1.5 using a different template.
<?php echo JHTML::calendar(date("Y-m-d", $today), 'checkin_date', 'checkin_date',"%Y-%m-%d", 'class="inputbox" style="width: 72px; padding-right: 4px;" maxlength="10"'); ?>
I am using the JA_Portfolio template. Any ideas what is wrong?