Time format

8 views
Skip to first unread message

Mani

unread,
Aug 31, 2020, 3:36:47 AM8/31/20
to Orbeon Forms
Hi Alex - I would like the time format to be like [h]:[m] (eg 2:39 pm ). I have changed the property as below and the time control still shows the seconds (eg 2:39:00 pm ). Please let me know what needs to be changed

<property
as="xs:string"
name="oxf.xforms.format.input.time"
value="[h]:[m]: [P,2-2]"/>


Thanks

Alessandro Vernet

unread,
Sep 3, 2020, 8:31:49 PM9/3/20
to orb...@googlegroups.com
Hi Manish,

This is just because the `[h]:[m] [P,2-2]` format wasn't supported. Per the
documentation, only the following 4 formats were supported:

- [h]:[m]:[s] [P]
- [h]:[m]:[s] [P,2-2]
- [H]:[m]:[s]
- [H]:[m]

So if including the am/pm or a.m./p.m., you also had to include the seconds.
I don't think that there was any good reason for this (!), so we added the
support for am/pm or a.m./p.m. without seconds. For reference, this is
tracked by issue #4661, and it will be in Orbeon Forms 2020.1.

https://github.com/orbeon/orbeon-forms/issues/4661

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/
Reply all
Reply to author
Forward
0 new messages