cancel
Showing results for 
Search instead for 
Did you mean: 

Date Navigator

Former Member
0 Kudos

Hi,

I want to capture the date selected by user from date navigator and set it to a variable of type date. Can anybody suggest me doing that.

Regards,

Prasanthi O.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

hi first create a context value,set the property of that context value as date.And create a inputfiels and select this context for the value property of that inputfield.

To set this value to a Date variable use the following java code

Date d=wdcontext.currentContextElement().get<the contextname>();

SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");//this is to format the datetype as u want

FormattedDate=sdf.format(d);

if u face any pble while trying this code let me know

Warm Regards

Shanto Aloor

Former Member
0 Kudos

I am using the date navigator UI element. I want to know how to store tht selected date.

Former Member
Former Member
0 Kudos

Hi Prasanthi,

you can capture the date using the following code

wdContext.currentContextElement().get<your attribute name>;

Regards,

P.Manivannan

Former Member
0 Kudos

Hi

Use this Code

Date setDate = new Date(System.currentTimeMillis());
setDate = wdContext.currentVnDateElement().getVauserDate();
wdComponentAPI.getMessageManager().reportSuccess(""+setDate);

Regards

Chandran S

Former Member
0 Kudos

Hi,

You can use the following method getLastSelectedDate()

Regards

Ayyapparaj

Former Member
0 Kudos

Create a context attribute “myDate” of type Date.Bind it to a UI Element of type Inputfield.

Now you can get the selected date by

wdContext.currentContextElement().getMyDate();

Former Member
0 Kudos

hai prashanthi,

just place a inputfield in view.bind this input field to a context attribute of type date.

after user selects the value in on enter or in wdmodify you try printing the context attribute.

Any issues let me know

Thanks n Regards

Sharanya.R