APAR status
Closed as program error.
Error description
XPages Date Time Picker field defaults to today's date Reported from StackOverflow http://stackoverflow.com/q/15632042/2083858 Given the following source code example on both 9.0.0 and 8.5.3, observe that there is a change in behaviour on 9.0.0 where if a value is unspecified in the XSP Source the resulting control displays today's date when previously this was not the case. There is a workaround available below however there was discussion to introduce a property to toggle the desired behaviour. <?xml version="1.0" encoding="UTF-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:inputText id="inputText1" value="#{sessionScope.inputText1}"> <xp:this.converter> <xp:convertDateTime type="date" /> </xp:this.converter> <xp:dateTimeHelper /> </xp:inputText> </xp:view>
Local fix
Workaround is to clobber the widget prototype postCreate function to prevents the value being reset like so. The same issue will affect the Date, Time and Date Time Picker; however the workaround below can be modified for the TimeTextBox, DateTimeTextBox accordingly. <?xml version="1.0" encoding="UTF-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:this.resources> <xp:script clientSide="true"> <xp:this.contents><![CDATA[ require([ "dojo/_base/lang", "ibm/xsp/widget/layout/DateTextBox" ], function(lang, DateTextBox){ var a = {}; lang.mixin(a, { postCreate: function(){ this.inherited(arguments); } }); DateTextBox.extend(a); }); ]]></xp:this.contents> </xp:script> </xp:this.resources> <xp:inputText id="inputText1" value="#{sessionScope.inputText1}"> <xp:this.converter> <xp:convertDateTime type="date" /> </xp:this.converter> <xp:dateTimeHelper /> </xp:inputText> </xp:view>
Problem summary
A programming error was found and will be corrected in a future release.
Problem conclusion
A programming error was found and will be corrected in a future release.
Temporary fix
Comments
This APAR is associated with SPR# DEGN966F5V. A programming error was found and will be corrected in a future release.
APAR Information
APAR number
LO76079
Reported component name
NOTES CLIENT
Reported component ID
5724E6255
Reported release
853
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2013-07-02
Closed date
2013-07-15
Last modified date
2013-07-15
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
NOTES CLIENT
Fixed component ID
5724E6255
Applicable component levels
R853 PSN
UP
[{"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Product":{"code":"SSKTWP","label":"Lotus Notes"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.5.3","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
15 July 2013