cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to call getDateValue() from DateTimePicker Class in SAPUI5

avisheksharmacoder
Participant
0 Kudos

I have a View file that uses the DateTimePicker Class.

avisheksharmacoder_1-1708595810346.png

In controller, I am not able to call the getDateValue() method to get the date time from the view when it is selected. It is showing undefined. 

avisheksharmacoder_0-1708595720501.png

but in the parent class DatePicker, the getDateValue() method is available. So why can't I directly use this method in the DateTimePicker class since DateTimePicker already extends the DatePicker class. Or do I have to call the super constructor for this in the controller code? (Can you show how). 

(I am getting this error in SAPUI5 v1.60 which comes along with SAP MII v15.3)

 

View Entire Topic
junwu
Active Contributor

did the byId give you the datetimepicker control?

why not using binding? using byid to get the control and then get value is very ugly in ui5.

avisheksharmacoder
Participant
0 Kudos
using byId didn't return anything, as no such method is available at the Control level, but inherited control has a getValue method. You mean to say, I can use byId().binding() ? like this?
junwu
Active Contributor