I'm trying to use the calendar provided with joomla in the component. I'm using the following code to display the calendar:
Code: Select all
<input class="inputbox" type="text" name="valid_from" id="valid_from" size="15" maxlength="10" value="<?php echo $this->rl_ad->valid_to; ?>" />
<a href="#" onclick="return showCalendar('dates', 'y-mm-dd');"><img class="calendar" src="images/blank.png" alt="calendar" /></a>
In my view-object, I'm preparing the calendar with this code:
Code: Select all
function display($tpl = null)
{
...
JHTML::_('behavior.calendar'); // preparing the calendar
$body_editor =& JFactory::getEditor();
$this->assignRef( 'body_editor', $body_editor );
$this->assignRef('rl_ad', $rl_ad);
parent::display($tpl);
}
Well the input field with the calendar displays... but when I wanna change the date by clickin on the icon... nothing happens.... so.. what am I doing wrong !??
Thanx, Alex
BTW: I'm using the current SVN