hi,
i just want to ask if it's possible to fill a date input with the sysdate ?. and thanks |
Administrator
|
Yes.
<xforms:bind ref="my-date" calculate="current-date()"/> -Erik On Mon, Apr 9, 2012 at 4:24 PM, globe <[hidden email]> wrote: > hi, > > i just want to ask if it's possible to fill a date input with the sysdate ?. > > > and thanks > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/automaticly-fill-a-date-input-with-sysdate-tp4544149p4544149.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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 > -- 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 |
Hi,
If you use <xforms:bind ref="my-date" calculate="current-date()"/> you can not populate the filed with another date, you can't choose from calendar another date because the field will automatically populated with sysdate, because of the calculate attribute behaviour. <xforms:bind doesn't have xxforms:default value attribute so on event xforms-model-construct-done or xforms-ready you can check if the "my-date" is empty and set value <xforms:setvalue ref="my-date" value="adjust-date-to-timezone(current-date(), ())"/> Maybe there is another solution or only for me "calculate" in bind is not working proper. |
Administrator
|
To make the value writable:
<xforms:bind ref="my-date" calculate="current-date()" readonly="false()/> But then you don't want to recalculate every time, probably only upon form load: <xforms:bind ref="my-date" xxforms:default="current-date()" readonly="false()/> -Erik On Tue, Apr 10, 2012 at 4:48 AM, s.valkova <[hidden email]> wrote: > Hi, > If you use <xforms:bind ref="my-date" calculate="current-date()"/> you can > not populate the filed with another date, you can't choose from calendar > another date because the field will automatically populated with sysdate, > because of the calculate attribute behaviour. <xforms:bind doesn't have > xxforms:default value attribute so on event xforms-model-construct-done or > xforms-ready you can check if the "my-date" is empty and set value > <xforms:setvalue ref="my-date" > value="adjust-date-to-timezone(current-date(), ())"/> > Maybe there is another solution or only for me "calculate" in bind is not > working proper. > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/automaticly-fill-a-date-input-with-sysdate-tp4544149p4545365.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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 > -- 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 |
Free forum by Nabble | Edit this page |