I guess this is because Calendar's day starts from 0 not 1

On Tue, Aug 25, 2009 at 11:13 AM, Vicente de Rivera III <
[email protected]> wrote:

> Hi, I modified the KitchenSink demo to print the selected value in the
> Calendar component,
>
> component = (Component)wtkxSerializer.readObject(this, "calendars.wtkx");
>                     org.apache.pivot.wtk.Calendar cal =
>                             (org.apache.pivot.wtk.Calendar)
> wtkxSerializer.get("cal");
>                     cal.getCalendarSelectionListeners().add(new
> CalendarSelectionListener() {
>
>                         public void
> selectedDateChanged(org.apache.pivot.wtk.Calendar calendar, CalendarDate
> previousSelectedDate) {
>                             System.out.println("day: " +
> calendar.getSelectedDate().getDay());
>                         }
>                     });
>
> The calendar returns the value of selected day - 1 (if 25 is selected, it
> will return 24).
> I also tried building the latest source code, but still yields the same
> result
>
> --
> thirdy
>



-- 
De Rivera, Vicente III S. "Thirdy"
+639178847846
http://thirdy.derivera.googlepages.com/
http://thirdy.co.nr
http://himynameisthirdy.blogspot.com
-my personal website and blog

Reply via email to