Add days to a date picker

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Add days to a date picker

danieldotnet
I would like to add 14 days to the selected date, only then should the entry
be valid. Specifically: If the selected date is further in the future than
+14 days then the entry is valid.
How can I do this in the XPath field (validation)?

I found this here, but it doesn't work.
days-to-date(days-from-date(local-date()) + 30)

My control is only date - without time.
Thank you for your help.

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1563365107929-0.post%40n4.nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add days to a date picker

Alessandro  Vernet
Administrator
Hi Daniel,

I think that you're looking for the following:

    days-from-duration(. - current-date()) >= 14

You'll let me know if this works for you,

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1563471809184-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Add days to a date picker

danieldotnet
Hi Alessandro
Great, thank you.
This is exactly what I was looking for. It works.

Best regards,
Daniel

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1563874992937-0.post%40n4.nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add days to a date picker

Alessandro  Vernet
Administrator
Excellent Daniel, I'm glad that date validation expression worked, and thank
you for the confirmation.

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1564174283504-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet