Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Hello fellow SAPUI5 learners and experts,

A quick tip regarding input fields and dates. I was trying to have an input field that allows a user to select a date as a month.

I used a sap.m.DatePicker with the displayFormat as below, to select a month period.

This worked well enough; the DatePicker field showed the date as expected and is treated as I wanted.

However I still had to click down to the day in the picker view:

For example, I still had to click all the way through to 16th (or whatever) April 2015 to select April 2015. One extra click felt inelegant, how could I avoid it?

It turns out that using sap.m.DateTimeInput was the more correct choice in this instance!

leads to:

The date picked will implicitly always be the 1st day of the  chosen month.

No doubt not much of an observation to our UI5 veterans, but a learning item for me!

7 Comments
Labels in this area