on 09-18-2017 2:19 PM
Dear All,
I am doing date format using this function sap.ui.core.format.DateFormat.getDateTimeInstance({ pattern: "YYYY-MM-ddTHH:mm" });.
converting to string from date object.
The date format is working fine in "EN" but it is returning wrong value in "DE".
Reproduceable in DE . Change your browser language to DE. Close and open browser. use bellow link to see the issue
http://jsbin.com/ficezasuxo/1/edit?html,output
The date input value is 01.01.2021 but its returning 01.01.2020 in "DE"
I did debug F11. In DateFormat-dbg.js bellow highlighted method is called and when highlighted line changes the date value.
the line is calling UniversalDate-dbg.js file is getting called.
In UniversalDate-dbg.js highlight if else block is executing for different language.
data value 01.01.2021,02.01.2021,03.01.2021 is not working 04.01.2021 is working Because else if (oDate < oFirstDay) is like (04.01.2021 < 04.01.2021).
Check for var oFirstDay
else block is executing for EN.
Best Regards,
Sathish Mani
Hi All,
The issue has beed fixed by adding Parameter UTC:false.
sap.ui.core.format.DateFormat.getDateTimeInstance({ pattern: "YYYY-MM-ddTHH:mm" ,UTC:false});
Best Regards,
Sathish Mani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.