We have been discussing about this in:
http://www.nabble.com/Input-date-format-question-td19951846.html but I cannot manage to do what I want by reading this info. I need: -A date input control with date picker bound for me to enter dates like this 1/1/1932 ([D]/[M]/[Y]) via date picker or typing it. As this is a recurrent issue maybe it will be good to document it! for example this 4.4.2 xforms:input in http://www.orbeon.com/ops/doc/reference-xforms-2 is not accurate as it does not work in 3.7 beta. thx a lot. really grateful if any bright mind could inspire me. Any hack will be welcommed if theres not a canonical way to do it. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Rich,
You edit conf/properties-xforms.xml -- <property as="xs:string" name="oxf.xforms.format.input.date" value="[M]/[D]/[Y]"/> <!-- [M]/[D]/[Y] or [D].[M].[Y]--> <property as="xs:string" name="oxf.xforms.format.input.time" value="[h]:[m]:[s] [P]"/> <!-- [h]:[m]:[s] [P] or [H]:[m]:[s] --> to [D].[M].[Y] and you get a date field that can be filled in by users : experience proved it take about a week of adapting, but users accept it. It works for birth dates. -- einar On Mon, Nov 24, 2008 at 6:42 PM, <[hidden email]> wrote: We have been discussing about this in: -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
>
> to [D].[M].[Y] and you get a date field that can be filled in by users : > experience proved it take about a week of adapting, but users accept it. It > works for birth dates. I guess this does not work for orbeon-3.7.0beta1.200808260135...only recent nightly build, isn't it? Reflecting again about this problem. I'll be glad if any of Orbeon Team, einar, chris or tonym that has been dealing with this can say a word about. 1. I need to input a date by typing it like this 1/2/2007 and let it parsed as day,month,year (spanish format). The input would be done by using the date picker too. 2. I need the date to be output like this 1/2/2007 to be understood by the user as day,month, year. Any way to get it done? with wich orbeon version? P.D: Maybe spanish users may accept to type 1.2.2007 but requisite 2. is a must, they must see 1/2/2007 in order to understand the date, other outputs like 2/1/2007 will lead them to missunderstand the result. thx a lot. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Orbeon's latest nightly built does allow entries d.m.y the output however is in French so you would have to edit the jar files I guess to include a Spanish version.
On Tue, Nov 25, 2008 at 11:51 AM, Richard C. Hidalgo Lorite <[hidden email]> wrote: > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
In reply to this post by richhl
> 1. I need to input a date by typing it like this 1/2/2007 and let it
> parsed as day,month,year (spanish format). The input would be done > by using the date picker too. We have planned improvements to xforms.js to switch the series of regular expressions based on 1) language and 2) a "picture" string reflecting the format expected. But this hasn't been implemented yet. However, we would welcome your help if you want to look at the latest xforms.js. There is already quite a bit of code in place to handle this, just not the switching based on language. > 2. I need the date to be output like this 1/2/2007 to be understood > by the user as day,month, year. How is the date output, within the input control (xforms:input) or using xforms:output? > > Any way to get it done? with wich orbeon version? It seems that some of the calendar changes have been made after your version, so better get a recent nightly build. -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
> However, we would welcome your help if you want to look at the latest
> xforms.js. There is already quite a bit of code in place to handle > this, just not the switching based on language. > ok, i have done a little of hacking not really well conceived soliution but it works for spanish....plan to contribute it tomorrow...thx -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
>> However, we would welcome your help if you want to look at the latest
>> xforms.js. There is already quite a bit of code in place to handle >> this, just not the switching based on language. >> > > ok, i have done a little of hacking not really well conceived > soliution but it works for spanish....plan to contribute it > tomorrow...thx Sounds great! -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
> Sounds great!
here you are a patch (cvs diff -up) against xforms.js version 1316 for getting DD/MM/YY format one has to use <property as="xs:string" name="oxf.xforms.format.input.date" value="[D]/[M]/[Y]"/> to get this new format. greetings, rich -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws xforms_patch_for_ddmmyy_format.patch (2K) Download Attachment |
Administrator
|
Richard,
I mentioned this in another thread already, but for completeness I thought I should respond to this message as well. Your patch is now in CVS. It will be in the next nightly build. Thank you for the contribution! Alex |
Free forum by Nabble | Edit this page |