cancel
Showing results for 
Search instead for 
Did you mean: 

Action onDaySelect in CalendarMonthView

Former Member
0 Kudos

Hi everyone...

I have the CalendarMonthView and want to some functionality to it.

the problem is that I dont know how to get the selected Date from the view...

The CalendarMonthView doesn't have any other Date properties besides firstVisibleDate and it's not working?

Can anyone help?!

Thanks.

George.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi George,

Do the Steps to get the Selected Date.

Create an <b>Action</b> for the <b>OnDaySelect</b> of the <b>DateNavigator</b>(Say <b>Sel_Date</b>)

Create a <b>paramete</b>r for the action handler of type <b>java.sql.date</b>(Say <b>Date_Temp</b>)

In the DoModify View

Place the coding...

if(firstTime)
    {
    	IWDDateNavigator obj = (IWDDateNavigator)view.getElement("<id of the DateNavigator>");
    	obj.mappingOfOnDaySelect().addSourceMapping("day","Date_Temp");
    }

In the action handler(Sel_Date), Place the follwing coding,

Date dt = Date_Temp;
wdComponentAPI.getMessageManager().reportSuccess(dt.toString());

This will display the the date selected.

Regards,

Mathan MP

Former Member
0 Kudos

Hi Mathan,

that did it. Your fix was meant for another UI element but it worked the same for me.

Thanks a lot.

Cheers,

George.

Former Member
0 Kudos

If available in your IDE, do this with the view designer instead of programmatically. Right-click the CalendarMonthView in the "Outline" and check if there is an entry "Parameter Mapping".

Armin

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi George..

Have u Set the Date Type in the context attribute value....

URs GS