cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAPUI5 Date Picker only for Month and Year

Ajinkya_Jadhav
Participant
0 Likes
2,660

Hello Experts,

I am using SAP HANA XSA to create an UI5 application using MTA Project.

I want a Date Picker with only Month and Year.

I copied the below code from UI5 Samples but it is still showing the date part.

<DatePicker
id="DP101"
value="2015-11-23"
displayFormat="MM-y"
change="handleChange"
class="sapUiSmallMarginBottom"/>

https://sapui5.hana.ondemand.com/#/entity/sap.m.DatePicker/sample/sap.m.sample.DatePicker/code

Could you please help me?

Thank You.

Best Regards,

Ajinkya Jadhav

Accepted Solutions (0)

Answers (2)

Answers (2)

Sezin
Newcomer
0 Likes

This issue is related to the version you are using. For example, I tried it with 1.44.39, and it didn't work. Then I upgraded the version, and it worked with 1.71.63.

former_member656694
Participant
0 Likes

I tried the same code worked for me.

Could you share the error message details if any

Ajinkya_Jadhav
Participant
0 Likes

Hello,

There is no error code, its just shows the dates as well. I only want month and year to be shown.

I want this(copied from sample):

But it is showing this.

Thank You.

Best Regards,

Ajinkya Jadhav