API
@-Formulas
JavaScript
LotusScript
Reg Exp
Web Design
Notes Client
XPages
 
Dojo Text Box picker vs Standard Date Picker
I discovered something when working with date pickers and Dojo. I wanted to include a dynamically expanding field using the Dojo Text Area control (<xe:djTextarea>). This is how it's supposed to work:
Snap 1

Before any information is typed in, the size is fixed. After information is typed in, the size expands dynamically:
Snap 2

In my scenario, the text area wasn't working. It was showing like the below image and not expanding:
Snap 3

I discovered that if the text area appears anywhere on the XPage after a STANDARD date picker, it wasn't working. What I mean by "standard" is the one that comes with Domino Designer:
Snap 4
The "Use date/time picker pop-up" is selected here. In XPages source, it looks like this:
<xp:inputText id="inputText1">
<xp:this.converter>
<xp:convertDateTime type="date"></xp:convertDateTime>
</xp:this.converter>
<xp:dateTimeHelper></xp:dateTimeHelper>
</xp:inputText>


However, it wasn't ONLY because of the standard date picker. There was one other player involved. The whole thing was inside a Dojo expanding section (called a "TitlePane").
<xp:panel dojoType="dijit.TitlePane">

The Dojo TitlePane gives a nice expand/collapse section where certain fields can be grouped together:
Snap 5

Clicking the twisty or title collapses the section in a nice wipe effect.

In order to get everything to work, I had to use the Dojo date time helper. This was actually an easy change - I didn't need to remove the field or anything, although I could have done that. I simply changed the date time helper in the source. Instead of <xp:dateTimeHelper></xp:dateTimeHelper>, I used <xp:dateTimeHelper dojoType="dijit.form.DateTextBox"></xp:dateTimeHelper>.

Additionally, because I was just switching the helper and not using the real Dojo control (the one that comes with the Extension Library or Domino 9), I had to include the Dojo Module dijit.form.DateTextBox in my Resources section on my XPage. (If I had removed the control and used the Dojo control, that module would have been included automatically).

After making those changes, both the date time picker and the text area worked as expected inside the collapsible section:
Snap 6