cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Using a time picker with below code . The Server side of SAP is in EDM.string format as PT13H31M00S .

How is the value to be converted from time picker to required format.


  <DateTimeInput
  type="Time"

id="datepicker"

  placeholder="Enter Time ..."
  class="sapUiSmallMarginBottom" />


controller,js

var dtime = this.getView().byId('datepicker').getValue();

alert(dtime); //1:31 PM


Are there any functions to achieve the same ?



0 Likes
View Entire Topic
former_member204338
Participant

I know it's an old thread but just wanted to share alternative solution: you could specify type in binding

<TimePicker value="{path: 'ltime', type: 'sap.ui.model.odata.type.Time'}"/>