Xpages Date Time Picker field defaults to today's date

前端 未结 2 1277
庸人自扰
庸人自扰 2020-12-20 03:49

Running a ND9 server and when browsing a Xpage with a date field, the default value for this field is always today\'s date.

On a 8.5.3 server the control is rendered

相关标签:
2条回答
  • 2020-12-20 04:38

    Add this to your XPage and the behavior is like in 8.5.3

    <xp:this.resources>
    <xp:script clientSide="true">
    <xp:this.contents><![CDATA[
    require([
    "dojo/_base/lang",
    "ibm/xsp/widget/layout/DateTextBox",
    "ibm/xsp/widget/layout/TimeTextBox",
    "ibm/xsp/widget/layout/DateTimeTextBox"
    ], function(lang, DateTextBox, TimeTextBox, DateTimeTextBox){
    var a = {};
    lang.mixin(a, {
    postCreate: function(){
    this.inherited(arguments);
    }
    });
    DateTextBox.extend(a);
    TimeTextBox.extend(a);
    DateTimeTextBox.extend(a);
    });
    ]]></xp:this.contents>
    </xp:script>
    </xp:this.resources>
    

    Thanks IBM for the fast response.

    0 讨论(0)
  • 2020-12-20 04:44

    This was actually a fix put into v9.0. Today's date appearing by default is now the expected behaviour

    0 讨论(0)
提交回复
热议问题