oxy_datePicker() and ISO dates

Are you missing a feature? Request it's implementation here.
Posts: 48
Joined: Wed Oct 22, 2014 4:11 pm

oxy_datePicker() and ISO dates

Post by friedemann_bach » Tue Apr 28, 2015 12:47 pm

Dear developers,

I make frequent use of oxy_datePicker() for inserting ISO dates. In most cases, the required date format is yyyy-MM-dd (like 1853-05-24), which works perfectly.

In some cases, it is neccessary to insert only the month of a year, or even only the year. According to the ISO standard, this would result in "1853-05" or just "1853". Is it possible to modify the datePicker in a way that it allows to select either year/month/day or year/month, or only year?

Posts: 779
Joined: Wed Nov 16, 2005 11:11 am

Re: oxy_datePicker() and ISO dates

Post by alex_jitianu » Tue Apr 28, 2015 2:43 pm


Is there any aspect that decides which format will be used (like maybe an attribute on the element or a certain value for an attribute) or is it just that you sometimes don't know the whole date?
The date picker doesn't accept multiple formats. All you can do is disable the format validation by using the validateInput parameter:

Code: Select all

edit, "@attribute",
format, "yyyy-MM-dd",
validateInput, false,
columns, 16);
When you select a date from the pop-up widget it will be inserted in the format "yyyy-MM-dd" but using the editable text field you can insert dates in any format. To make up for the lost validation you could add a few Schematron checks that will ensure that the format is one of the accepted ones.

Best regards,

Post Reply