XForms: set default date in binding
I am new to Xforms and need help setting the default da开发者_JS百科te in nodeset binding. I need to set the default date to be current date + 30 days. How do I do this?
If you want the result to be an xs:dateTime
, then the following will do the trick:
current-dateTime() + xs:dayTimeDuration('P30D')
Figured it out. In the binding, I set the default for the date to days-to-date(days-from-date(local-date()) + 30). But this does not set the time though. And my field is of type xs:datetime.
精彩评论