Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
show-titlefalse
titleDescription

If This property allows template authors want to create render a date picker instead of a plain date string in entered by the user with a wizard.

The property value is required to match the format 'yyyy-MM-dd', they add a hidden field to their SOY template with the key 'projectdoc-adjustVarValues-toDatePicker' and list, comma-separated, the names of other parameters that should be rendered as a date picker. Add the property to the Soy Template as a hidden input element. The value is expected to be a comma-separated list of parameter names.

The date picker XML element looks like this:

Code Block
languagexml
<time datetime="2016-02-2524"/>

The element is rendered like this:

Image Added

Section
titleExample of Usage

Add this hidden input element to your SOY template:Assume for this example to require two date fields in your wizard to specify the from and to date of an iteration.

Code Block
languagexml
<div class="field-group">
    <label for="projectdoc-duration-from">{getText('projectdoc.doctype.iteration.duration.from')}</label>
    <input id="projectdoc-duration-from" class="datepicker-field date-field text" 
           type="text" name="projectdoc-duration-from" size="10" autocomplete="off">
</div>
<div class="field-group">
    <label for="projectdoc-duration-to">{getText('projectdoc.doctype.iteration.duration.to')}</label>
    <input id="projectdoc-duration-to" class="datepicker-field date-field text" 
           type="text" name="projectdoc-duration-to" size="10" autocomplete="off">
</div>

Add this hidden input element to your Soy Template:

Code Block
languagexml
<input id="projectdoc-adjustVarValues-toDatePicker" type="hidden"
          name="projectdoc-adjustVarValues-toDatePicker"
          value="projectdoc-duration-from, projectdoc-duration-to">

Access the value of the data date picker elements in your page template like this:

Code Block
languagexml
<at:var at:name="projectdoc-duration-from" at:rawxhtml="true"/> - <at:var at:name="projectdoc-duration-to" at:rawxhtml="true"/>

...