[elm] calendar: Fixing a problem with min/max year
Respecting the years bounds. SVN revision: 82346
This commit is contained in:
parent
a05fc18d87
commit
fd30ab1d76
|
@ -561,7 +561,7 @@ _update_data(Evas_Object *obj, Eina_Bool month,
|
|||
int delta)
|
||||
{
|
||||
struct tm time_check;
|
||||
int maxdays;
|
||||
int maxdays, years;
|
||||
|
||||
ELM_CALENDAR_DATA_GET(obj, sd);
|
||||
|
||||
|
@ -600,7 +600,12 @@ _update_data(Evas_Object *obj, Eina_Bool month,
|
|||
}
|
||||
else
|
||||
{
|
||||
sd->shown_time.tm_year += delta;
|
||||
years = sd->shown_time.tm_year + delta;
|
||||
if (((years > sd->year_max) && (sd->year_max != -1)) ||
|
||||
years < sd->year_min)
|
||||
return EINA_FALSE;
|
||||
|
||||
sd->shown_time.tm_year = years;
|
||||
}
|
||||
|
||||
if ((sd->select_mode != ELM_CALENDAR_SELECT_MODE_ONDEMAND)
|
||||
|
|
Loading…
Reference in New Issue