How to add date picker in joomla site…


In your component html file, put the following code at the top of your function:

JHTML::_('behavior.calendar');

Then for your date field in your form:

input class="inputbox" type="text" name="startdate" id="startdate" size="25" maxlength="25" value="" &
input type="reset" class="button" value="..." onclick="return showCalendar('startdate','%Y-%m-%d');"

Advertisements

8 thoughts on “How to add date picker in joomla site…

  1. I tried your way of showing the code but its showing “Uncaught ReferenceError: showCalendar is not defined ” error…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s