You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

projectdoc Toolbox

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

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

If template authors want to create a date picker instead of a plain date string in 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.

The date picker XML element looks like this:

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

Example of Usage

Add this hidden input element to your SOY template:

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

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

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

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