on 08-06-2009 9:40 AM
hi all,
i've two inputfields of type Date. the first one user selects a date using the date icon after the input field. i want to set the second date(addition to selected date) immediately after selecting the first date..! is it possible? if yes how?
tnx,
-JB
Hi
It's possible with Date Navigator. Check this thread: .
BR, Sergei
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As there is no action correspoding to date icon which is coming by using date type with input field. You can not populate date automatically by just selecting date through date icon as there is no event handler associated to that. You have only one option to code in the onEnter event hander of input field, this will give you date in the another i/p field after pressing enter on first i/p field.
Regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi JB,
You have a prperty named firstSelectedDate with the Date Navigator. Bind the context attribute of type date to the firstSelectedDate property of the datenavigator UI element.
Let say the context attribute to which you have bound the UI element has the name date and the second attribute name is endDate. Your requirement is to set the end Date as soon as the date is slected in the first inout field. Now create an action for the event onDaySelect. Write the following code in the event handler
public void onActionselectdate(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionselectdate(ServerEvent)
// Take the value of the selected date.
Date date = wdContext.current<NODE_NAME>element.getDate();
// Set the second date equal to selected Date.
wdContext.current<NODE_NAME>element.setEndDate(date);
//@@end
}
I hope this will solve youri ssue. Please revert back in case you need any further assistance on this.
Thanks and Regards
Pravesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Both,
both of you gave me good option to choose datenavigation ui element, which i was not aware to use because of wrong assumption tht it is used only for date range. thankful to both of you.
but when run my appln it shows the date ui element directly, but i want something like my previous case. where on click of date icon (next to inputfield), the date ui should be visible to select the date. so is there any way to use this date navigator on click on date icon?? is it possible?? or popup window is the last option?
tnx,
-JB
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.