oxy_datePicker() and ISO dates
Are you missing a feature? Request its implementation here.
-
- Posts: 48
- Joined: Wed Oct 22, 2014 4:11 pm
oxy_datePicker() and ISO dates
Post by friedemann_bach »
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?
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: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: oxy_datePicker() and ISO dates
Post by alex_jitianu »
Hello,
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:
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,
Alex
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
oxy_datePicker(
edit, "@attribute",
format, "yyyy-MM-dd",
validateInput, false,
columns, 16);
Best regards,
Alex
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service