

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 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}{0}
\DoxyCodeLine{   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 \mbox{\hyperlink{calendar_example_03_8c-example}{calendar\+\_\+example\+\_\+03.\+c}} here. 