DateDialog

Top  Previous  Next

DateDialog is a Process Field. It can be used inside or outside of a ProcessRecord Element.

It encloses:

Three select elements for day, month and year values
A read-only text input a hidden for displaying the day of week
Two hidden inputs; one for work and one for keeping the value to submit.

  <span mo:type="DateDialog" mo:field="true" mo:name="ORDERDATE" mo:needsInit="true" 
       mo:iValue="{ORDERDATE}"
       mo:props="
          valueFormat     : 'yyyy-mm-dd hh:nn:ss.0', 
          submitFormat    : 'yyyy-mm-dd', 
          defaultDate     : '1970.01.01', 
          monthFormat     : 'Long Text', 
          fromDate        : '1970.01.01', 
          toDate          : '2030.12.31', 
          onDayChange     : OnDayChange, 
          onMonthChange   : OnMonthChange, 
          onYearChange    : OnYearChange, 
          onChange        : OnChange, 
          nonBlank        : true, 
          valHandler      : MyValHandler, 
          valErrorHandler : MyErrorHandler
        ">
    <select name="__Day" onchange="DateMgr.dayChanged(this)" />
    <select name="__Month" onchange="DateMgr.monthChanged(this)" />
    <select name="__Year" onchange="DateMgr.yearChanged(this)" />
    <input type="text" name="__DayText" disabled="disabled" readonly="readonly"/>
    <input type="hidden" name="pf_ORDERDATE"/>
    <input type="hidden" name="__Work"/>
  </span>

 

See DateDialog Function Class in MoreMotion Face API.

Properties

valueFormat

The format of the initial value. See Date Formatting.

submitFormat

The format of the value to submit. See Date Formatting.

monthFormat

The format of the month. The valid values are "Short Text", "Long Text" and "Number"

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

onDayChange

The name of the onDayChange Handler.

onMonthChange

The name of the onMonthChange Handler.

onYearChange

The name of the onYearChange Handler.

onChange

The name of the onChange Handler.

 
Note: All handler functions receive the DateDialog object as the only parameter.

 
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>