\section{calendar\-\_\-example\-\_\-04.\-c}

\begin{DoxyCodeInclude}

\textcolor{preprocessor}{#include <Elementary.h>}

\textcolor{preprocessor}{#define SECS\_DAY 86400}
\textcolor{preprocessor}{}
EAPI\_MAIN \textcolor{keywordtype}{int}
elm\_main(\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} **argv)
\{
   Evas\_Object *win, *bx, *cal, *cal2;
   \textcolor{keyword}{struct }tm selected\_time;
   time\_t current\_time;

   win = elm_win_util_standard_add(\textcolor{stringliteral}{"calendar"}, \textcolor{stringliteral}{"Calendar Day Selection Example"});
   elm_win_autodel_set(win, EINA\_TRUE);
   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   bx = elm_box_add(win);
   evas\_object\_size\_hint\_weight\_set(bx, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   elm_win_resize_object_add(win, bx);
   evas\_object\_show(bx);

   cal = elm_calendar_add(win);
   evas\_object\_size\_hint\_weight\_set(cal, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   evas\_object\_size\_hint\_align\_set(cal, EVAS\_HINT\_FILL, EVAS\_HINT\_FILL);
   elm_calendar_select_mode_set(cal, ELM\_CALENDAR\_SELECT\_MODE\_NONE);
   evas\_object\_show(cal);
   elm_box_pack_end(bx, cal);

   cal2 = elm_calendar_add(win);
   evas\_object\_size\_hint\_weight\_set(cal2, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   evas\_object\_size\_hint\_align\_set(cal2, EVAS\_HINT\_FILL, EVAS\_HINT\_FILL);
   current\_time = time(NULL) + 2 * SECS\_DAY;
   localtime\_r(&current\_time, &selected\_time);
   elm_calendar_selected_time_set(cal2, &selected\_time);
   evas\_object\_show(cal2);
   elm_box_pack_end(bx, cal2);

   evas\_object\_show(win);

   elm_run();
   elm_shutdown();

   \textcolor{keywordflow}{return} 0;
\}
ELM_MAIN()
\end{DoxyCodeInclude}
 