projectdoc Toolbox

Requests to transform a plain date value to a date picker element.

Tags
Identifier
projectdoc-adjustVarValues-toDatePicker
Type
List of Strings
Value Range
List of blueprint parameter names.
Since
1.10

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

The property value is required to match the format 'yyyy-MM-dd'. 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:

<time datetime="2016-02-24"/>

The element is rendered like this:

Example of Usage

Assume for this example to require two date fields in your wizard to specify the from and to date of an iteration.

<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:

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

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

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