I set up a text box in an XPage to display a Date field using dijit.form.DateTextBox. The date value displays fine when I’m editing a document (MM/dd/yyyy).
However, when I’m reading the document in the XPage, the date displays as yyyy-MM-dd.
I needed to add a custom converter so that the date entered via the widget would be saved to the back-end Notes document. I believe this is the cause behind the date appearing in the yyyy-MM-dd format in read mode. Is there anything I can do about this?
<xp:inputText id=“WeekEnding”
value="#{document1.WeekEnding}" required="true"
dojoType="dijit.form.DateTextBox">
<xp:this.converter>
<xp:convertDateTime type="date"
pattern="yyyy-MM-dd">
</xp:convertDateTime>
</xp:this.converter>
<xp:this.validators>
<xp:validateRequired
message="Please enter the Report Ending date">
</xp:validateRequired>
</xp:this.validators>
</xp:inputText>