on 11-05-2007 9:57 AM
I want to display a calendar in my application....I want to display 3 months of the calendar on d screen..i have set the months per row property 4 that... i want
2 display current mon in the middle i.e it shud display previous mon,current mon n d next mon....
for that i bind the property startsWith to a context...
How to set that context to the previous mon, basically how to get previous month's value....
hi,
You can use the following solution.
Date curr = new Date(System.currentTimeMillis());
int year = curr.getYear();
int month = curr.getMonth()-1;
Date curr2 = new Date(year,month,1);
wdContext.currentContextElement().setStartsWith(curr2);
wdContext.currentContextElement().setStartDate(curr);
where startsWith and startDate are the context attributes. Bind startsWith to startsWith property and startDate to firstSelectedDate property of the DateNavigator UI element.
Place the above lines of code in wdDoInit().
This will work surely.
thanks & regards,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Check this Blog
Hope this helps u.
Regards
Krishna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.