tI want to add a calendar field to my custom form:
http://docs.joomla.org/Calendar_form_field_type
But I'd like that expected date format would be different depending on user's active language, as "standard" format is different from Europe to the US, for example. When outputting a date, Joomla handles that by default using DATE_FORMAT_LC constant, which comes fully localised with each language pack, and you can even customise it on a per language basis using language overrides... is there something similar for entering dates?
In the link I posted above it says this:
format (optional) is the date format to be used. This is in the format used by PHP to specify date string formats (see below). If no format argument is given, '%Y-%m-%d' is assumed (giving dates like '2008-04-16').
I've tried entering the lang constant for date format to that parameter, but doesn't seem to work:
<field name="mycalendar" type="calendar" default="5-10-2008" label="Select a date" description="" format="DATE_FORMAT_LC" />
Is there a built-in way for handling this? Or I'll have to add the logic to use one format or another depending on user's language?
Thanks in advance!