cancel
Showing results for 
Search instead for 
Did you mean: 

To get Date in DropDown

Former Member
0 Kudos

Hi all,

I am trying to get a Date in DropDown, that is when i click on the dropdown arrow i want to get the calender of the current month

Is there any procedure to do that as i am not able to get that, While i am able to do this using inputfield,But my requirement is to get the calender in dropdown.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kalyan,

You can do this by binding a InputField to a contextattribute of type Date .

In this case if you type date for example 8/22/2006 and click on the dropdown then automatically you can see "August" month calender.

Regards, Anilkumar

Former Member
0 Kudos

Hi Anil,

I know this can be done using InputField But my requirement is that when i click on the dropdown and select a particular date it should perform an action.

But what's happening is that Only after i select a date and press the enter Key the action is performed I want the action to be performed without pressing enter key ie., soon after i select the day from the dropdown calender it should perform an action.

Thank You,

Kalyan

Answers (3)

Answers (3)

Former Member
0 Kudos

Good explanation Valery

Regards, Anilkumar

Former Member
0 Kudos

Hi Kalyan,

Currently you do this only by pressing the "ENTER" key bcose you are using Inpufield.

Regards, Anilkumar

Former Member
0 Kudos

Hi Anil,

Isn't there any possibility to do this using dropdownbyKey Becoz as u select the particular date It may perform some action By setting the properties in the Event OnSelect for dropdownbyKey, the thing is that i am not able to get a calender in dropdownByKey.

Thanks

Kalyan

Former Member
0 Kudos

Hi,

Why do you want to do this? A drop-down, ideally, is used to let the user choose from a pre-defined list of values. Since you want to choose a date and you don't want a pre-defined list, you might as well use an InputField and bind it to a Date type.

Regards,

Satyajit.

Message was edited by: Satyajit Chakraborty

Former Member
0 Kudos

If you mean you want a list of the current dates listed in the drop down, you could setup a node and specifically populate it with elements (using date type for the attribute). Then use a drop down by index and bind it to the date attribute.

-Cindy

Former Member
0 Kudos

Hi Cindy,

I don't want the list of dates in the dropdown i want the entire calender of the year If i enter a particular date in the dropdown after clicking on the dropdown arrow it should display the calender of that particular month Same as we do in case of InputField.

-Kalyan

Former Member
0 Kudos

Kalyan,

Then the only option that at least looks similar to what you whant is:

1. Create InputField and Link2Action elements, place them near each other with Matrix or Grid layout, set image for Link2Action.

2. Make InputField read-only, create action for Link2Action.

3. In action handler open pop-over window using IWDWindowManager. The new window must contains view with single DateNavigator component embedded.

4. Aforementioned view with date navigator must handle date selection event, set corresponding context attribute (that is used by InputField in [1]) and close own view.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Hi Valery,

The solution for my question that u have sent was very useful but i am still unable to resolve my issue.

let me explain in detail:

My application is to select a date in the Input Field and then click on the image which i put it in Link to Url UI Element When i click on the image which looks like a button it should go to the concerned link and get the reports according to the date I selected in the Input Field.

But What's happening is, after i select the date Only after pressing enter I am able to pass the date to the reference link of the Image(Link to Url).

I want to pass the parameters of the date without pressing enter Is there anyother way to solve my Problem.

Thanks,

Kalyan.

Former Member
0 Kudos

Kalyan,

Replace LinkToUrl with LinkToAction control. Assign action handler for this new control. In action handler you will have date value assigned already. So the only thing left to do here is:


wdComponentAPI
  .getWindowManager()
    .createNonModalExternalWindow
      (
    	"url-of-report", "Report Title"
      ).open();

Valery Silaev