

This example explains how to set max and min year to be displayed by a calendar object. This means that user won\textquotesingle{}t be able to see or select a date before and after selected years. By default, limits are 1902 and maximum value will depends on platform architecture (year 2037 for 32 bits); You can read more about time functions on {\ttfamily ctime} manpage.

Straigh to the point, to set it is enough to call \hyperlink{group__Calendar_gaed08ee8d0c149d1501d8731a6e2fbc8c}{elm\+\_\+calendar\+\_\+min\+\_\+max\+\_\+year\+\_\+set()}. First value is minimum year, second is maximum. If first value is negative, it won\textquotesingle{}t apply limit for min year, if the second one is negative, won\textquotesingle{}t apply for max year. Setting both to negative value will clear limits (default state)\+: 
\begin{DoxyCodeInclude}
   elm_calendar_min_max_year_set(cal, 2020, 2022);

\end{DoxyCodeInclude}


Our example will look like this\+:

 
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{screenshots/calendar_example_03}}
\end{DoxyImageNoCaption}


See the full source code \hyperlink{calendar_example_03_8c-example}{calendar\+\_\+example\+\_\+03.\+c} here. 