Search code examples
xformsmindate

xforms mindate on a date-picker


Could someone please tell me the correct syntax for adding a minimum date/time to the date picker in a datetime field. This works

<fr:date mindate="2012-05-05" ref="mydate">

this does not

<fr:date mindate="current-date()" ref="mydate">

thank you


Solution

  • You can only use an attribute for mindate or maxdate in the fr:date component if the value is static. If the value is determined by an XPath expression, you need to use a nested element with the ref attribute. So the following should do the trick:

    <fr:date ref="mydate">
        <fr:mindate ref="current-date()"/>
    </fr:date>