Dojo Text Box picker vs Standard Date PickerI 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:
Before any information is typed in, the size is fixed. After information is typed in, the size expands dynamically:
In my scenario, the text area wasn't working. It was showing like the below image and not expanding:
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:
The "Use date/time picker pop-up" is selected here. In XPages source, it looks like this:
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").
The Dojo TitlePane gives a nice expand/collapse section where certain fields can be grouped together:
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: