Skip to Content
avatar image
Former Member

TimePicker does not update the OData Model


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( + 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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 24, 2017 at 01:42 PM

    once you use formatter, it becomes oneway binding....if i am not wrong.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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?