cancel
Showing results for 
Search instead for 
Did you mean: 

hoe to retrive the selected date in the date navigator

Former Member
0 Kudos

hai all

i am using date navigator ,

can any body suggest how to retrive the selected date in date navigator into a local variable

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Map the firstSelected Date of date navigater to one value attribute of type date and lastSelected Date of date navigater to one value attribute of type date .

Finaly when u want to take the value you can give this code

java.sql.Date t=wdContext.currentContextElement().getFdate();

Regards,

H.V.Swathi

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

->bind the FirstSelectedDate and LastSelectedDate Property of date navigator with a two Context Attributes of Type Date.

->Now make an Action for OnDaySelect of DateNavigator.

->In the OnAction , Read the Context Attribute which is binded to Date Navigator.

wdContext.currentContextElement.getSelectedDate();

Hope this helps you..

Regards,

Saleem

Former Member
0 Kudos

Hi,

In WebDynpro you can use DateNavitor UI element to show the calander for more than one month at a time.

For this UI element you need to bind the context attributes of type (date) to the below properties

1. FirstSelectedDate

2. LastSelectedDate

Or

You can simply take a inputfield and bind a context attribute of type date and bind that context attribute to that inputfield.

Automatically date navigator will be displayed along with that input field at run time.

Note: In both the cases you need not to initialize the context attributes.

Whenever user selects a date on the screen automatically these context attributes will be filled with selected date.

You can get that selected date using the below code.

For example, if the context attribue created is SelectedDate(type: date)

wdContext.currentContextElement().getSelectedDate();

Regards,

Charan