Formatting Orbeon Date input fields

时间:2015-06-26 09:43:52

标签: orbeon xforms

I am trying to format an input field of the type xs:date in Orbeon. I have tried using the xxf:format attribute, but the datepicker can not understand the date when it has been modified.

The idea now was to change the javascript of Orbeon to use the xxf:unformat attribute to interpret the date and transform it back to ISO format. I've tried changing the data.js but for some reason none of the changes can be seen.

Am I changing the wrong file?

Edit

I figured out that the xforms.js has a function 'getCurrentValue' which is being as the changes I do there are visible. Now I just need to figure out who is the one that's calling the function.

Edit:

It is the Calendar who requests the value of the input when the user clicks on the symbol. This all happens at the client side, and the generated HTML does not have the format/unformat attributes. However I want to use their value. Can I make a request to Orbeon to get it? How?

1 个答案:

答案 0 :(得分:1)

如果您使用绑定到xf:input类型节点的xs:date,则可以使用oxf.xforms.format.input.date属性control the formatting of the date field。支持一些格式,如果您想添加更多格式,最好遵循当前用于当前支持格式的模式。

E.g。

[M]/[D]/[Y]
[Y]-[M01]-[D01]