- assigned_to: nobody --> iamroberthanson
- status: open --> open-accepted
I am using the CalendarListener to keep a header updated with the Month and Year of the currently showing calendar. it works perfectly, except getting it to the right state when the panel is initialized is problematic because the onMonthChange() is not called when the listener is added.
I have a couple of options:
1. call onMonthChange(CalendarMonth cm) directly -- can't do this the CMs are internal to the panel
2. call factory.fireMonthChange(), which I cannot do because I don't have the factory
3. cp.setCalendarMonth(cp.getCurrentMonth(), cp.getCurrentYear()) to fire off an event. but wait getCurrentYear() returns a String! worse it calls
Integer.toString(cm.getYear());
to convert it to a string, instead of leaving it as an integer for me
4. pull the code out of onMonthChange() and delegate to it
on a similar note, please add the method
Date CalendarMonth.getDate()
so i can call the SimpleDateFormat easier
thanks
Log in to post a comment.