cancel
Showing results for 
Search instead for 
Did you mean: 

DateNavigator Object

Former Member
0 Kudos

Hi all,

We're using the DateNavigator Object with 3 horizontal calendar's.

The Marking is correctly filled but we need to know whether the user clicks on the next or previous arrows to change the calendar's months.

The only way we have discovered to do this is making a date comparision in the onStartChangeDate Action.

So we have the following code in the wdDoModifyView:

public static void wdDoModifyView(IPrivateNotAusencias wdThis, IPrivateNotAusencias.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)

{

//@@begin wdDoModifyView

IWDDateNavigator dn = (IWDDateNavigator) view.getElement("DateNavigatorNotAus");

wdContext.currentContextElement().setCalendarStartsWith(dn.getStartsWith());

//@@end

}

We access the Navigator and retrieve de startsWith value to a local var.

Then in the onStartChangeDate Action we compare it:

if (calendarStartsWith<CompareDate)

setText("Previous");

else

setText("Next");

CompareDate=calendarStartsWith;

The code was too extense to put it here, but it works like that.

The problem is that the startsWith value is often wrong.

How can I retrieve the correct value?

Well, and I only want to see if the user clicks Next or Previous in the UIElement, if there is any other easier way it would be appreciated also.

Hope someone may help me!!!

Thanks in advance,

Best Regards,

Mário Semedo

Accepted Solutions (0)

Answers (1)

Answers (1)

venkatakalyan_karanam
Active Contributor
0 Kudos

Hi

please go through this thread

regards

kalyan