cancel
Showing results for 
Search instead for 
Did you mean: 

Date field as Input

Former Member
0 Kudos

Hi,

I am facing a problem for date field.

i have created an input field and bind that with date type value attribute. now i am getting a calender after the input field.

My problem is that when a user select a date from the calender that should be passed to an rfc input parameter.

How can we do that??

please suggest code for that..

regards

Accepted Solutions (0)

Answers (3)

Answers (3)

nikhil_bose
Active Contributor
0 Kudos

change the attribute type of date attribute to RFC date attribute and you can easily do the rest as pradeep suggested.

nikhil

Former Member
0 Kudos

Hi,

After selecting the date, No action will take place..

If you want to do it, write the functionality in onEnter action of

input field, You should press Enter after selecting date from

datenavigator

Regards

LN

Former Member
0 Kudos

Hi,

You cannot do that as no action is fired when you select the date from the calendar.

You need to do the same thing on action of some button say for example "Save".

Hope it helps.

thanks & regards,

Manoj

Former Member
0 Kudos

Hi Manoj,

The scenerio is as follows:

User selects date from the calender and status type.

Selected date populated into the input field.

now user click a button details.

so i need the selected date as input for the RFC to get data.

regards

Former Member
0 Kudos

Hi,

Now its very simple. As you said that you have a date attribute mapped to your date inputField. You can retrieve the date as follows:

Date inputDate = wdContext.currentContextElement().get<Attr Name>();

Now set this to the input parameter of your RFC which accepts date.

Hope this helps.

thanks & regards,

Manoj

PradeepBondla
Active Contributor
0 Kudos

Hi,

I was also thinking in otherway...

if the data parameter is sent to rfc after button click.

you can write the above specified code in onAction method of the button. After setting the date parameter execute the rfc.

Date inputDate = wdContext.currentContextElement().get<Attr Name>();

wdcontext.yourBAPInode.setXXX(inputDate);

wdthis.yourBAPI.execute();

if you face any trouble let us know

regards,

Pradeep