Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions CodenameOne/src/com/codename1/ui/spinner/DateSpinner3D.java
Original file line number Diff line number Diff line change
Expand Up @@ -403,13 +403,13 @@ public void setCurrentYear(int currentYear) {
if (!explicitStartYear && startYear > currentYear) {
startYear = currentYear;
}
if (!explicitEndYear && endYear -1 < currentYear) {
endYear = currentYear+1;
if (!explicitEndYear && endYear < currentYear) {
endYear = currentYear;
}
if (currentYear < startYear) {
throw new IllegalArgumentException("Current year "+currentYear+" before start year "+startYear);
}
if (currentYear > endYear - 1) {
if (currentYear > endYear) {
throw new IllegalArgumentException("Current year "+currentYear+" after end year "+endYear);
}
if(year != null) {
Expand All @@ -433,13 +433,13 @@ public void setCurrentDay(int currentDay) {
if (!explicitStartDay && startDay > currentDay) {
startDay = currentDay;
}
if (!explicitEndDay && endDay -1 < currentDay) {
endDay = currentDay + 1;
if (!explicitEndDay && endDay < currentDay) {
endDay = currentDay;
}
if (startDay > currentDay) {
throw new IllegalArgumentException("Start day "+startDay+" after current day "+currentDay);
}
if (endDay -1 < currentDay) {
if (endDay < currentDay) {
throw new IllegalArgumentException("End day "+endDay+" before current day "+currentDay);
}
if(day != null) {
Expand All @@ -466,13 +466,13 @@ public void setCurrentMonth(int currentMonth) {
if (!explicitStartMonth && startMonth > currentMonth) {
startMonth = currentMonth;
}
if (!explicitEndMonth && endMonth -1 < currentMonth) {
endMonth = currentMonth+1;
if (!explicitEndMonth && endMonth < currentMonth) {
endMonth = currentMonth;
}
if (startMonth > currentMonth) {
throw new IllegalArgumentException("Start month "+startMonth+" after current month "+currentMonth);
}
if (endMonth -1 < currentMonth) {
if (endMonth < currentMonth) {
throw new IllegalArgumentException("End month "+endMonth+" before current month "+currentMonth);
}
if(month != null) {
Expand Down
Loading