on 09-12-2014 4:01 PM
Hi everyone,
Just wondering if anyone else has noticed the issue with the DatePicker and values greater than 12/31/2043? It knocks the year date back to 19** for any value greater 2043. Any way to adjust this?
Tom
Hi,
you have to set the date format to "yyyy" in the SAP general settings.
i hope it's help you.
regards Alessandro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've just tried the SAPUI5 explored DatePicker example and it seems to let me add dates greater than 2043. Have you added any particular validation / conversion?
Regards,
Jason
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Jason!
Sorry, I wasn't very informative on my specific case. I have a simple check on whether the date is in the past using the "change" event. My specific DatePicker is in an XML view, bound to an Odata model and is using a "long" displayFormat, as shown below.
For the time being, I just down adjust any dates on the backend system to 12/31/2043, although for some reason it shows as 12/30/2043 in the DatePicker..
<DatePicker id="validToDate"
dateValue="{path:'Tdate', formatter:'fnDateTimeFormatter'}"
displayFormat="long"
change="handleDateChange"
width="200px" />
function fnDateTimeFormatter(oValue){
if (oValue == undefined || oValue == "") {
return;
}
return new Date(oValue);
};
handleDateChange : function(oValue) {
var oView = this.getView();
var oDatePicker = oView.byId("validToDate");
var oEntry = oDatePicker.getDateValue();
this.validateNewDate(oEntry);
},
Tom
I'm not sure where that could be/is being set. In my Odata service, I'm getting an Edm.DateTime value like this -> <d:Tdate>2043-12-31T00:00:00</d:Tdate>.
<Property Name="Tdate" Type="Edm.DateTime" Precision="7" sap:label="Valid through" sap:creatable="false" sap:sortable="false" sap:filterable="false"/>
And I can verify that the Odata value shows correctly for values greater than the year 2043 (before my backend edit was in place).
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.