|In Joomla! 1.5, form fields were parameters. For that version, you may want to use the corresponding Calendar parameter type.|
The calendar form field type provides a text box for entry of a date. An icon next to the text box provides a link to a pop-up calendar, which can also be used to enter the date value. If the field has a saved value this is shown in the text box. Otherwise the default value, if any, is displayed.
Example XML field definition:
<field name="mycalendar" type="calendar" default="5-10-2008" label="Select a date" description="" format="%d-%m-%Y" />
|d||Day of the month, 2 digits with leading zeros||01 to 31|
|a||A textual representation of a day, three letters||Mon through Sun|
|e||Day of the month without leading zeros||1 to 31|
|A||A full textual representation of the day of the week||Monday through Sunday|
|w||Numeric representation of the day of the week||0 (for Sunday) through 6 (for Saturday)|
|j||The day of the year (starting from 0)||001 through 366|
|B||A full textual representation of a month||January through December|
|m||Numeric representation of a month, with leading zeros||01 through 12|
|b||A short textual representation of a month, three letters||Jan through Dec|
|Y||A full numeric representation of a year, 4 digits||1999 or 2003|
|y||A two-digit representation of a year||99 or 03|
|p||Lowercase Ante Meridiem or Post Meridiem||am or pm|
|P||Uppercase Ante Meridiem or Post Meridiem||AM or PM|
Note: The format in which dates are stored in the params.ini file is that specified by the format argument. Since there can be language-dependent elements to this format (for example, the '%A' specifier), you need to be careful not to use such elements if there is a possibility that the front-end and back-end languages may be different.
Note: The calendar form field type does not support non-Gregorian calendars. If you need to support non-Gregorian calendars then you will need to create a custom form field type to support your calendar.