We've been using jQuery date pickers long before APEX used them as standard so have our own way of implementing them, that being said it shouldn't have any effect on what I'm trying to do.
Now I have a page in which fields defined by the user are displayed along side APEX fields. To do this I'm using apex_item and generating items on the page based on settings controlled by the user in another part of the application. The APEX items are displayed followed by custom items using apex_item. Again, this works fine and I've used it many times before.
The problem I have is when a user creates a custom field which is a date picker and the date picker is translated.
If the user is viewing the page in Norwegian then for an APEX field the date picker is shown in Norwegian and if they select May 1st then 1-Mai-2013 is returned to the field. The value of this field is 1-Mai-2013 when the page is submitted, but somehow the value is saved in the database correctly and when the database is queried the date is saved as 01-MAY-2013. For a custom field the value is saved in the database as 1-Mai-2013 and when this is then viewed by a user in English the page errors with not a valid month.
My questions are:
- How does APEX save a translated date field? How does 1-Mai-2013 become a proper date? If I try to save this in the database, unsurprisingly I get an invalid month error.
- How can I use apex_item to have a date picker that is translated? apex_item.date_popup can't be used as this doesn't use the jQuery date picker. Perhaps this is a setting in jQuery UI to translate the date back? One solution is to use dd/mm/yyyy format, but I really don't want to do this.
Many thanks for your help. If you need any more info let me know.