DateBox

Top  Previous  Next

DateBox is a Process Field. It can be used inside or outside of a ProcessRecord Element. It encloses a hidden and a text input elements. The text input element is used to display and edit the value in display format and the hidden input element is used submit the value in submit format.

  <span mo:type="DateBox" mo:field="true" mo:name="BIRTHDAY" mo:needsInit="true" 
       mo:iValue="{BIRTHDAY}"
       mo:props="
          valueFormat     : 'yyyy-mm-dd hh:nn:ss.0', 
          displayFormat   : 'yyyy.mm.dd', 
          submitFormat    : 'yyyy-mm-dd', 
          defaultDate     : '1970.01.01', 
          fromDate        : '1970.01.01', 
          toDate          : '2030.12.31', 
          nonBlank        : true, 
          valHandler      : MyValHandler,
          valErrorHandler : MyErrorHandler
        ">
    <input type="hidden" name="pf_ORDERDATE"/>
    <input type="text" name="__t" onchange="DateMgr.dateChanged(this);" />
  </span>

 

See DateBox Function Class in MoreMotion Face API.

Properties

valueFormat

The format of the initial value. See Date Formatting.

displayFormat

The representation and the edit format of the date value. See Date Formatting.

submitFormat

The format of the value to submit.

defaultDate

If initial value is not provided with mo:iValue attribute the value defined with this property is used.

fromDate

The minimum date to be entered

toDate

The maximum date to be entered

 
See Validation Properties

Note that the validation properties are effective only if the this is placed into a Process Record.

 

Required Javascript Files

This element requires the following Javascript files are linked to the page in the HEAD section of the HTML document as follows.

  <head> 
    ...
    <script type="text/javascript" src="moremotion/face/DateNum/Date.js"></script>
    <script type="text/javascript" src="moremotion/face/_resources/<language-code>/DateNum.js"></script>
  </head>