Prasanna
Prasanna

Reputation: 1751

Dates Calendar (sap.me)

I'm new to sapUi5, i'm using sap.me calendar which is being opened in one popup. I want to implement something, whenever I opened that popup currently it is showing me current month. But lets say i'm changing it's month from current month to some random previous month. and i closed that popup. And s'pose i again opened that popup current date is not being displayed. whatever month I've selected before closing that popup is being displayed. Sharing screen shot for more visibility.Sept. is current month.it is opening for 1st time. enter image description here

Now if i click on back arrow then selected lets say selecting Jan, 2018. and closing the popup. enter image description here

And if again i opened that popup then Jan,2018 is selected. I want to set it's calendar date according to current month. ie. it should always show calendar for current date.not the previous value selected.

Any suggestions to set month according to our choice. Help will be appreciated..!!

Upvotes: 1

Views: 362

Answers (1)

Marc
Marc

Reputation: 6190

There is a method setCurrentDate.

Just access your Calendar object and call that method, e.g.:

oCalendar.setCurrentDate(new Date().toDateString());

Deprecated as of version 1.26.0. This control was experimental since 1.12. Please use the sap.ui.unified.Calendar instead!

So you should consider dumping your sap.me.Calendar.

Upvotes: 1

Related Questions