

This example explains how to set max and min year to be displayed by a calendar object. This means that user won'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_ga3693138d3f7563629525f100c6598a4c}{elm\-\_\-calendar\-\_\-min\-\_\-max\-\_\-year\-\_\-set()}. First value is minimum year, second is maximum. If first value is negative, it won't apply limit for min year, if the second one is negative, won'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{DoxyImage}
\includegraphics{screenshots/calendar_example_03}
\caption{width=}
\end{DoxyImage}


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