on 10-13-2008 8:25 AM
Hello experts,
could anyone please let me know how I can write the selected Day(Calendar) in a Attribute?
Thanks
Regards
Marco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi experts,
sorry but I am not able do read the selected date.
I' ve done following:
IActualDateNode actualDate = wdContext.nodeActualDate();
IActualDateElement actualDateElement = wdContext.createActualDateElement();
actualDateElement.setSelectedDate(Calendar.DAY_OF_MONTH);
actualDate.addElement(actualDateElement);
But if I click on the calendar I get always a "5" as Value.
What did I wrong??
Thanks a lot!
Hi,
What is the data type of SelectedDate attribute?
If this is date do as follows
IActualDateNode actualDate = wdContext.nodeActualDate();
IActualDateElement actualDateElement = wdContext.createActualDateElement();
actualDateElement.setSelectedDate(new Date(Calendar.getInstance().getTimeInMillis()));
actualDate.addElement(actualDateElement);
Regards
Ayyapparaj
Hi,
Do you really need a date navigatror UI component ?
Why not use a context attribute of type and bound this to a InputField, Here too you will get a date selector.
You can still use the same code to set the default date to current date and on change you will be able to see the selected one.
Regards
Ayyapparaj
I have created a CalenderNavigater as UI-Element. There is no Input Field.
The Properties of the UI - Element does not give the oppurtunity to mapp a type.
But I can define a Event called "onSelect".
This means if I select a Entry in my Calendar this Event will run. And there in it I will read the selected Date and write it in a Contexttype.
Thanks!
Hi,
IActualDateNode actualDate = wdContext.nodeActualDate();
IActualDateElement actualDateElement = wdContext.createActualDateElement();
actualDateElement.setSelectedDate(new Date(Calendar.getInstance().getTimeInMillis()));
actualDate.addElement(actualDateElement);
If you are still using the above code you will be able to see the current date by default.
Once you change the date print it from the same context using
dComponentAPI.getMessageManager().reportSuccess(
wdContext.currentActualDateElement().getSelectedDate().toString());
Regards
Ayyapparaj
Hi
please go through this link Hope u will find ur answer
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=gettingtheselectedCalenderDate+&cat=sdn_all&start=1
Regards
Ruturaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
please go through this link Hope u will find ur answer
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=gettingtheselectedCalenderDate+&cat=sdn_all&start=1
Regards
Ruturaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marco,
DAY_OF_MONTH is a constant in Calendar class.
use Calendar.DAY_OF_MONTH as I have showed in the previous reply.
Regards,
Deepti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marco,
"DAY_OF_MONTH" is a constant which can accessed only using Calender instance and not directly.
If you can see the error "Day_OF_MONTH cannot be resolved" then u need to access it with a calender instance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
class Calender has method get() which accepts an integer parameter. You can get selected day using this method.
Try
get(Calendar.DAY_OF_MONTH)
Regards,
Deepti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.