on 03-24-2017 1:38 PM
Hi,
I am facing a problem with a TimePicker in my UI5 application. I have an ODataV2 Service which has a time field in the format "Edm.Time". I have bound it to a TimePicker and used a formatter Function to resolve the timezone offset issue.
<m:TimePicker dateValue="{path: 'Bcontd/Cttime', formatter: '.formatter.timePicker'}" />
timePicker: function(time) {
if(time == null)
return null;
//timezone offset in ms
var TZOffsetMs = new Date(0).getTimezoneOffset()*60*1000;
return new Date(time.ms + TZOffsetMs);
}
The time is perfectly fine displayed in my Timepicker and I am able to change the time inside the TimePicker but my OData Model does not seem to update the value.
Does anyone know what I am missing?
once you use formatter, it becomes oneway binding....if i am not wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, you are right! When I removed the formatter function, the TimePicker updates the model. But now I'm facing the problem that I have to pass the value over the "value" parameter because "dateValue" only allows a JavaScript object to be passed. Therefore, the Timepicker writes a String into my model which causes an error when I send the Merge request to the backend system. Do you have any idea for that?
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.