/[Apache-SVN]
ViewVC logotype

Revision 1703071


Jump to revision: Previous Next
Author: rwhitcomb
Date: Mon Sep 14 22:06:20 2015 UTC (8 years, 7 months ago)
Changed paths: 2
Log Message:
PIVOT-978: Fix Calendar control to only allow valid years.

Two changes:
1. Add two static methods to CalendarDate to get the min and max supported
   years for dates.
2. Then, set the Spinner data for the year spinner in the Calendar control
   to have these values as the bounds.  Have to change the code to use
   getSelectedItem instead of getSelectedIndex, because the index no longer
   starts at zero, to get/set the year value from the Spinner.

There is still a small problem: when you try to display January 1583, it
needs to reach back to 1582 to get the start of the week, and then you will
get the exception.  Other than that, everything seems fine.


Changed paths

Path Details
Directorypivot/branches/2.0.x/core/src/org/apache/pivot/util/CalendarDate.java modified , text changed
Directorypivot/branches/2.0.x/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraCalendarSkin.java modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26