on 2017 Dec 20 11:12 AM
var sToday = new Date(); //today// example : 20.12.2017
this.getView().byId("mesaiTbdPicker").setDateValue(sToday); // set today to datepicker //20.12.2017
and I sending this data.But i looking data in abap date looking 1 before day. //19.12.2017
I tried this but not worked;
var sToday = new Date();
sToday = sToday + 1;
Please help.
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
You have to play with the timezone such as CET to get the correct date.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it may not be a problem, the browser is showing local time, the abap side is showing server time,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Before sending date value to the oData you have to format it in format as "YYYY-MM-DDTHH:MM:SS". Use below formatter to do this. Passing date object to the odata cause this issue.
// format date for create
dateFormat:function(value) {
if(value == null){
return null;
}
var _smonth = value.getMonth() + 1;
var _sdate = value.getDate();
if (_smonth.toString().length < 2) {
_smonth = "0" + _smonth.toString();
}
if (_sdate.toString().length < 2) {
_sdate = "0" + _sdate.toString();
}
var formatDate = value.getFullYear() + '-' + _smonth + '-' + _sdate + "T00:00:00";
return formatDate;
},
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
50 | |
9 | |
8 | |
6 | |
5 | |
5 | |
5 | |
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.