2.4.1.8 Date Picker Control

A date picker control is used to select and display a date. The following table describes the symbols for a date picker control.

Symbol

Description

SIMPLE_DATE_PICKER

A date picker is a control with the capabilities of displaying, as well as selecting, a date. This can be accomplished by having a button that displays a view of a calendar. Clicking on the calendar allows the user to select a specific date. The date can also be manually entered in the date picker’s display text box.

DATE_PICKER_WITH_CONDITIONAL_FORMATTING

Similar to SIMPLE_DATE_PICKER, except that it allows for conditional formatting. Conditional text formatting attributes such as bold, italics, and color can be applied to the displayed date. Conditional disabling disables both the text box and the date picker’s calendar button. Conditionally hiding the control hides both the display box and the calendar button.

DATE_PICKER_WITH_DATA_FORMATTING

Similar to SIMPLE_DATE_PICKER, except that the data is formatted from its natural XML value.

DATE_PICKER_WITH_DATA_FORMATTING_AND_CONDITIONAL_FORMATTING

Similar to DATE_PICKER_WITH_CONDITIONAL_FORMATTING, except that the data is formatted from its natural XML value.

DATE_PICKER_WITH_PLACEHOLDER_TEXT

Similar to SIMPLE_DATE_PICKER, with the addition of text that is displayed in the control until actual data is entered. This displayed value is not persisted in the field (3) as a value.

DATE_PICKER_WITH_CONDITIONAL_FORMATTING_AND_PLACEHOLDER_TEXT

Similar to DATE_PICKER_WITH_PLACEHOLDER_TEXT and DATE_PICKER_WITH_CONDITIONAL_FORMATTING.

DATE_PICKER_WITH_DATA_FORMATTING_AND_PLACEHOLDER_TEXT

Similar to DATE_PICKER_WITH_PLACEHOLDER_TEXT and DATE_PICKER_WITH_DATA_FORMATTING.

DATE_PICKER_WITH_DATA_FORMATTING_AND_CONDITIONAL_FORMATTING_AND_PLACEHOLDER_TEXT

Similar to DATE_PICKER_WITH_PLACEHOLDER_TEXT and DATE_PICKER_WITH_DATA_FORMATTING_AND_CONDITIONAL_FORMATTING.

SIMPLE_DATE_PICKER:

 <div class="xdDTPicker" title="ANY_STRING1" style="DATE_PICKER_STYLE" noWrap="1" xd:CtrlId="CONTROL_ID" xd:xctname="DTPicker" (xd:postbackModel="POSTBACKMODEL")?>
     <span class="DATE_PICKER_TEXT_BOX_CLASS_NAME xdBehavior_NoBUI" hideFocus="1" (title="ANY_STRING1")? (accessKey="SINGLE_CHARACTER")? xd:xctname="DTPicker_DTText" xd:binding="LEAF_XPATH1" (tabIndex="TAB_INDEX1")? xd:innerCtrl="_DTText" (INPUT_SCOPE)?>
     CHECK_FOR_GETDOM_BEGIN1
         <xsl:value-of select="LEAF_XPATH1" />
     CHECK_FOR_GETDOM_END1
     </span>
     <button class="DATE_PICKER_BUTTON_CLASS_NAME" (title="ANY_STRING1")? xd:xctname="DTPicker_DTButton" xd:innerCtrl="_DTButton" (tabIndex="TAB_INDEX1")?>
         <img (title="ANY_STRING1")? src="res://infopath.exe/calendar.gif" (Linked="true")?/>
     </button>
 </div>

DATE_PICKER_WITH_CONDITIONAL_FORMATTING:

 <div class="xdDTPicker" title="ANY_STRING1" (style="DATE_PICKER_STYLE")? noWrap="1" xd:CtrlId="CONTROL_ID" xd:xctname="DTPicker" (xd:postbackModel="POSTBACKMODEL")?>
     <span class="DATE_PICKER_TEXT_BOX_CLASS_NAME xdBehavior_NoBUI" hideFocus="1" (title="ANY_STRING1")? (accessKey="SINGLE_CHARACTER")? xd:xctname="DTPicker_DTText" xd:binding="LEAF_XPATH1" (tabIndex="TAB_INDEX1")? xd:innerCtrl="_DTText" (INPUT_SCOPE)?>
     CHECK_FOR_GETDOM_BEGIN1
         (<xsl:attribute name="style">
             <xsl:choose>
                 (<xsl:when test="BOOLEAN_XPATH_EXPRESSIONx">(DATE_PICKER_STYLE_CONDITIONAL_FORMATTING)?</xsl:when>)*
             </xsl:choose>
         </xsl:attribute>)?
         (<xsl:choose>
             (<xsl:when test="BOOLEAN_XPATH_EXPRESSIONy">
                 (<xsl:attribute name="contentEditable">false</xsl:attribute>)?
             </xsl:when>)*
         </xsl:choose>)?
         <xsl:value-of select="LEAF_XPATH1" />
     CHECK_FOR_GETDOM_END1
     </span>
     <button class="DATE_PICKER_BUTTON_CLASS_NAME" (title="ANY_STRING1")? xd:xctname="DTPicker_DTButton" xd:innerCtrl="_DTButton" (tabIndex="TAB_INDEX1")?>
         <img (title="ANY_STRING1")? src="res://infopath.exe/calendar.gif" (Linked="true")?/>
     </button>
 </div>

DATE_PICKER_WITH_DATA_FORMATTING:

 <div class="xdDTPicker" title="ANY_STRING1" style="DATE_PICKER_STYLE" noWrap="1" xd:CtrlId="CONTROL_ID" xd:xctname="DTPicker" (xd:postbackModel="POSTBACKMODEL")?>
     <span class="DATE_PICKER_TEXT_BOX_CLASS_NAME xdBehavior_FormattingNoBUI" hideFocus="1" contentEditable="true" xd:xctname="DTPicker_DTText" xd:datafmt="DATA_FMT_CTRL_DATE_PICKER1" DATA_FMT2_ATTRIBUTE_DATE_PICKER1 xd:boundProp="xd:num" xd:binding="LEAF_XPATH1" (accessKey="SINGLE_CHARACTER")? (title="ANY_STRING1")? (tabIndex="TAB_INDEX1")? xd:innerCtrl="_DTText" (INPUT_SCOPE)?>
     CHECK_FOR_GETDOM_BEGIN1
         (<xsl:attribute name="xd:num">
             <xsl:value-of select="LEAF_XPATH1" /> 
         </xsl:attribute>)?
         <xsl:choose>
             DATA_FMT2_FUNCTION_DATE_PICKER1
             <xsl:when test="function-available('xdFormatting:formatString')">
                 <xsl:value-of select="xdFormatting:formatString(LEAF_XPATH1, DATA_FMT_CTRL_DATE_PICKER1)" />
             </xsl:when>
             <xsl:otherwise>
                 <xsl:value-of select="LEAF_XPATH1" />
             </xsl:otherwise>
         </xsl:choose>
     CHECK_FOR_GETDOM_END1
     </span>
     <button class="DATE_PICKER_BUTTON_CLASS_NAME" (title="ANY_STRING1")? xd:xctname="DTPicker_DTButton" xd:innerCtrl="_DTButton" (tabIndex="TAB_INDEX1")?>
         <img (title="ANY_STRING1")? src="res://infopath.exe/calendar.gif" (Linked="true")?/>
     </button>
 </div>
  

DATE_PICKER_WITH_DATA_FORMATTING_AND_CONDITIONAL_FORMATTING:

 <div class="xdDTPicker" title="ANY_STRING1" (style="DATE_PICKER_STYLE")? noWrap="1" xd:CtrlId="CONTROL_ID" xd:xctname="DTPicker" (xd:postbackModel="POSTBACKMODEL")?>
     <span class="DATE_PICKER_TEXT_BOX_CLASS_NAME xdBehavior_FormattingNoBUI" hideFocus="1" contentEditable="true" xd:xctname="DTPicker_DTText" xd:datafmt="DATA_FMT_CTRL_DATE_PICKER1" DATA_FMT2_ATTRIBUTE_DATE_PICKER1 xd:boundProp="xd:num" xd:binding="LEAF_XPATH1" (accessKey="SINGLE_CHARACTER")? (title="ANY_STRING1")? (tabIndex="TAB_INDEX1")? xd:innerCtrl="_DTText" (INPUT_SCOPE)?>
     CHECK_FOR_GETDOM_BEGIN1
         (<xsl:attribute name="style">
             <xsl:choose>
                 (<xsl:when test="BOOLEAN_XPATH_EXPRESSIONx">(DATE_PICKER_STYLE_CONDITIONAL_FORMATTING)?</xsl:when>)*
             </xsl:choose>
         </xsl:attribute>)?
         (<xsl:choose>
             (<xsl:when test="BOOLEAN_XPATH_EXPRESSIONy">
                 (<xsl:attribute name="contentEditable">false</xsl:attribute>)?
             </xsl:when>)*
         </xsl:choose>)?
         (<xsl:attribute name="xd:num">
             <xsl:value-of select="LEAF_XPATH1" /> 
         </xsl:attribute>)?
         <xsl:choose>
             DATA_FMT2_FUNCTION_DATE_PICKER1
             <xsl:when test="function-available('xdFormatting:formatString')">
                 <xsl:value-of select="xdFormatting:formatString(LEAF_XPATH1, DATA_FMT_CTRL_DATE_PICKER1)" />
             </xsl:when>
             <xsl:otherwise>
                 <xsl:value-of select="LEAF_XPATH1" />
             </xsl:otherwise>
         </xsl:choose>
     CHECK_FOR_GETDOM_END1
     </span>
     <button class="DATE_PICKER_BUTTON_CLASS_NAME" (title="ANY_STRING1")? xd:xctname="DTPicker_DTButton" xd:innerCtrl="_DTButton" (tabIndex="TAB_INDEX1")?>
         <img (title="ANY_STRING1")? src="res://infopath.exe/calendar.gif" (Linked="true")?/>
     </button>
 </div>
  

DATE_PICKER_WITH_PLACEHOLDER_TEXT:

 <div class="xdDTPicker" title="ANY_STRING1" style="DATE_PICKER_STYLE" noWrap="1" xd:CtrlId="CONTROL_ID" xd:xctname="DTPicker" (xd:postbackModel="POSTBACKMODEL")?>
     <span class="DATE_PICKER_TEXT_BOX_CLASS_NAME xdBehavior_GhostedTextNoBUI" hideFocus="1" contentEditable="true" (title="ANY_STRING1")? (accessKey="SINGLE_CHARACTER")? xd:xctname="DTPicker_DTText" xd:binding="LEAF_XPATH1" (tabIndex="TAB_INDEX1")? xd:innerCtrl="_DTText" (INPUT_SCOPE)?>
     CHECK_FOR_GETDOM_BEGIN1
         (<xsl:choose>
             <xsl:when test="not(string(LEAF_XPATH1))">
                 <xsl:attribute name="xd:ghosted">true</xsl:attribute>
                     ANY_STRING
                 </xsl:when>
             <xsl:otherwise>
                 <xsl:value-of select="LEAF_XPATH1" />
             </xsl:otherwise>
         </xsl:choose>) | (<xsl:value-of select="LEAF_XPATH1" />)
     CHECK_FOR_GETDOM_END1
     </span>
     <button class="DATE_PICKER_BUTTON_CLASS_NAME" (title="ANY_STRING1")? xd:xctname="DTPicker_DTButton" xd:innerCtrl="_DTButton" (tabIndex="TAB_INDEX1")?>
         <img (title="ANY_STRING1")? src="res://infopath.exe/calendar.gif" (Linked="true")?/>
     </button>
 </div>

DATE_PICKER_WITH_CONDITIONAL_FORMATTING_AND_PLACEHOLDER_TEXT:

 <div class="xdDTPicker" title="ANY_STRING1" (style="DATE_PICKER_STYLE")? noWrap="1" xd:CtrlId="CONTROL_ID" xd:xctname="DTPicker" (xd:postbackModel="POSTBACKMODEL")?>
     <span class="DATE_PICKER_TEXT_BOX_CLASS_NAME xdBehavior_GhostedTextNoBUI" hideFocus="1" contentEditable="true" (title="ANY_STRING1")? (accessKey="SINGLE_CHARACTER")? xd:xctname="DTPicker_DTText" xd:binding="LEAF_XPATH1" (tabIndex="TAB_INDEX1")? xd:innerCtrl="_DTText" (INPUT_SCOPE)?>
     CHECK_FOR_GETDOM_BEGIN1
         (<xsl:attribute name="style">
             <xsl:choose>
                 (<xsl:when test="BOOLEAN_XPATH_EXPRESSIONx">(DATE_PICKER_STYLE_CONDITIONAL_FORMATTING)?</xsl:when>)*
             </xsl:choose>
         </xsl:attribute>)?
         (<xsl:choose>
             (<xsl:when test="BOOLEAN_XPATH_EXPRESSIONy">
                 (<xsl:attribute name="contentEditable">false</xsl:attribute>)?
             </xsl:when>)*
         </xsl:choose>)?
         (<xsl:choose>
             <xsl:when test="not(string(LEAF_XPATH1))">
                 <xsl:attribute name="xd:ghosted">true</xsl:attribute>
                     ANY_STRING
                 </xsl:when>
             <xsl:otherwise>
                 <xsl:value-of select="LEAF_XPATH1" />
             </xsl:otherwise>
         </xsl:choose>) | (<xsl:value-of select="LEAF_XPATH1" />)
     CHECK_FOR_GETDOM_END1
     </span>
     <button class="DATE_PICKER_BUTTON_CLASS_NAME" (title="ANY_STRING1")? xd:xctname="DTPicker_DTButton" xd:innerCtrl="_DTButton" (tabIndex="TAB_INDEX1")?>
         <img (title="ANY_STRING1")? src="res://infopath.exe/calendar.gif" (Linked="true")?/>
     </button>
 </div>

DATE_PICKER_WITH_DATA_FORMATTING_AND_PLACEHOLDER_TEXT:

 <div class="xdDTPicker" title="ANY_STRING1" style="DATE_PICKER_STYLE" noWrap="1" xd:CtrlId="CONTROL_ID" xd:xctname="DTPicker" (xd:postbackModel="POSTBACKMODEL")?>
     <span class="DATE_PICKER_TEXT_BOX_CLASS_NAME xdBehavior_GTFormattingNoBUI" hideFocus="1" contentEditable="true" contentEditable="true" xd:xctname="DTPicker_DTText" xd:datafmt="DATA_FMT_CTRL_DATE_PICKER1" DATA_FMT2_ATTRIBUTE_DATE_PICKER1 xd:boundProp="xd:num" xd:binding="LEAF_XPATH1" (accessKey="SINGLE_CHARACTER")? (title="ANY_STRING1")? (tabIndex="TAB_INDEX1")? xd:innerCtrl="_DTText" (INPUT_SCOPE)?>
     CHECK_FOR_GETDOM_BEGIN1
         (<xsl:attribute name="xd:num">
             <xsl:value-of select="LEAF_XPATH1" /> 
         </xsl:attribute>)?
         <xsl:choose>
             (<xsl:when test="not(string(LEAF_XPATH1))">
                 <xsl:attribute name="xd:ghosted">true</xsl:attribute> 
                 ANY_STRING
             </xsl:when>)?
             DATA_FMT2_FUNCTION_DATE_PICKER1
             <xsl:when test="function-available('xdFormatting:formatString')">
                 <xsl:value-of select="xdFormatting:formatString(LEAF_XPATH1, DATA_FMT_CTRL_DATE_PICKER1)" />
             </xsl:when>
             <xsl:otherwise>
                 <xsl:value-of select="LEAF_XPATH1" />
             </xsl:otherwise>
         </xsl:choose>
     CHECK_FOR_GETDOM_END1
     </span>
     <button class="DATE_PICKER_BUTTON_CLASS_NAME" (title="ANY_STRING1")? xd:xctname="DTPicker_DTButton" xd:innerCtrl="_DTButton" (tabIndex="TAB_INDEX1")?>
         <img (title="ANY_STRING1")? src="res://infopath.exe/calendar.gif" (Linked="true")?/>
     </button>
 </div>
  

DATE_PICKER_WITH_DATA_FORMATTING_AND_CONDITIONAL_FORMATTING_AND_PLACEHOLDER_TEXT:

 <div class="xdDTPicker" title="ANY_STRING1" (style="DATE_PICKER_STYLE")? noWrap="1" xd:CtrlId="CONTROL_ID" xd:xctname="DTPicker" (xd:postbackModel="POSTBACKMODEL")?>
     <span class="DATE_PICKER_TEXT_BOX_CLASS_NAME xdBehavior_GTFormattingNoBUI" hideFocus="1" contentEditable="true" contentEditable="true" xd:xctname="DTPicker_DTText" xd:datafmt="DATA_FMT_CTRL_DATE_PICKER1" DATA_FMT2_ATTRIBUTE_DATE_PICKER1 xd:boundProp="xd:num" xd:binding="LEAF_XPATH1" (accessKey="SINGLE_CHARACTER")? (title="ANY_STRING1")? (tabIndex="TAB_INDEX1")? xd:innerCtrl="_DTText" (INPUT_SCOPE)?>
     CHECK_FOR_GETDOM_BEGIN1
         (<xsl:attribute name="style">
             <xsl:choose>
                 (<xsl:when test="BOOLEAN_XPATH_EXPRESSIONx">(DATE_PICKER_STYLE_CONDITIONAL_FORMATTING)?</xsl:when>)*
             </xsl:choose>
         </xsl:attribute>)?
         <xsl:choose>
             (<xsl:when test="BOOLEAN_XPATH_EXPRESSIONy">
                 (<xsl:attribute name="contentEditable">false</xsl:attribute>)?
             </xsl:when>)*
         </xsl:choose>
         (<xsl:attribute name="xd:num">
             <xsl:value-of select="LEAF_XPATH1" /> 
         </xsl:attribute>)?
         <xsl:choose>
             (<xsl:when test="not(string(LEAF_XPATH1))">
                 <xsl:attribute name="xd:ghosted">true</xsl:attribute> 
                 ANY_STRING
             </xsl:when>)?
             DATA_FMT2_FUNCTION_DATE_PICKER1
             <xsl:when test="function-available('xdFormatting:formatString')">
                 <xsl:value-of select="xdFormatting:formatString(LEAF_XPATH1, DATA_FMT_CTRL_DATE_PICKER1)" />
             </xsl:when>
             <xsl:otherwise>
                 <xsl:value-of select="LEAF_XPATH1" />
             </xsl:otherwise>
         </xsl:choose>
     CHECK_FOR_GETDOM_END1
     </span>
     <button class="DATE_PICKER_BUTTON_CLASS_NAME" (title="ANY_STRING1")? xd:xctname="DTPicker_DTButton" xd:innerCtrl="_DTButton" (tabIndex="TAB_INDEX1")?>
         <img (title="ANY_STRING1")? src="res://infopath.exe/calendar.gif" (Linked="true")?/>
     </button>
 </div>

DATE_PICKER_TEXT_BOX_CLASS_NAME: xdDTText or xdDTTextRTL.

DATE_PICKER_BUTTON_CLASS_NAME: xdDTButton or xdDTButtonRTL.

DATE_PICKER_STYLE: Semicolon-delimited list of (STYLE_WIDTH?, STYLE_PADDING?, STYLE_FONT?, STYLE_HEIGHT?, STYLE_TEXT_ALIGN?, STYLE_MARGIN?, WHITE-SPACE: nowrap?, STYLE_TEXT_DECORATION?, STYLE_BORDER?, STYLE_VERTICAL_ALIGN?, STYLE_BACKGROUND_COLOR?, STYLE_COLOR?, STYLE_DIRECTION?)

DATE_PICKER_STYLE_CONDITIONAL_FORMATTING: Semicolon-delimited list of (STYLE_FONT_WEIGHT?, STYLE_COLOR?, STYLE_TEXT_DECORATION?, STYLE_BACKGROUND_COLOR?, STYLE_FONT_STYLE?, STYLE_CAPTION)

DATA_FMT2_ATTRIBUTE_DATE_PICKER:

 (xd:datafmt2="DATA_FMT21")?

DATA_FMT2_FUNCTION_DATE_PICKER:

 (<xsl:when test="function-available('xdFormatting:formatString2')">
     <xsl:value-of select="xdFormatting:formatString2(LEAF_XPATH1, DATA_FMT_CTRL_DATE_PICKER1, 'DATA_FMT21')" />
 </xsl:when>)?

DATA_FMT2_ATTRIBUTE_DATE_PICKER and DATA_FMT2_FUNCTION_DATE_PICKER symbols appear in pairs in the EBNF rules. Subscripts are used to mark the pairs.

If the yield of DATA_FMT2_ATTRIBUTE_DATE_PICKER in one production is empty, the yield of the pairing DATA_FMT2_FUNCTION_DATE_PICKER MUST be empty.

If the yield of DATA_FMT2_FUNCTION_DATE_PICKER in one production is empty, the yield of the pairing DATA_FMT2_ATTRIBUTE_DATE_PICKER MUST be empty.

The following table list control-specific attributes used by the date picker control.

Attribute

Section

xd:allowNonMatching

2.4.2.2

xd:binding

2.4.2.6

xd:boundProp

2.4.2.9

xd:CtrlId

2.4.2.10

xd:datafmt

2.4.2.11

xd:datafmt2

2.4.2.37.4

xd:innerCtrl

2.4.2.19

xd:inputScope

2.4.2.20

xd:num

2.4.2.26

xd:postbackModel

2.4.2.29

xd:xctname

2.4.2.35

The xdFormatting:formatString XSL function extension, as specified in section 2.4.3.4, is used by the contact selector control.