Monday, February 1, 2010

how to insert date box in joomla site

In the component you can insert your date box in the joomla site. you need to call the JHTML class function named calander to do this. the below code you need to insert.
echo JHTML::_('calendar','mona','event_From', 'event_From', '%Y-%m-%d', array('class'=>'inputbox', 'size'=>'10', 'maxlength'=>'19'));

you will set the params
  1. /**
  2. * Displays a calendar control field
  3. *
  4. * @param string The date value
  5. * @param string The name of the text field
  6. * @param string The id of the text field
  7. * @param string The date format
  8. * @param array Additional html attributes (this for additional attribute)
  9. */

you also can set different attribute in this field. for detail please see


thanks.


No comments:

Post a Comment