# Calendar (/examples/widgets/calendar)



Calendar with highlighted days [#calendar-with-highlighted-days]

<LvglExampleBrief>
  Show February 2021 with three highlighted dates and log the tapped day.
</LvglExampleBrief>

A 185x230 `lv_calendar` is placed below screen center with today set
to 2021-02-23 via `lv_calendar_set_today_date` and the shown month
fixed by `lv_calendar_set_month_shown`. A static array of three
`lv_calendar_date_t` entries is registered through
`lv_calendar_set_highlighted_dates`. The `LV_EVENT_VALUE_CHANGED`
callback reads `lv_calendar_get_pressed_date` and logs the tapped
day. If `LV_USE_CALENDAR_HEADER_DROPDOWN` or `_ARROW` is available
the matching header is attached.

<LvglExample name="lv_example_calendar_1" path="widgets/calendar/lv_example_calendar_1" />

Chinese calendar mode [#chinese-calendar-mode]

<LvglExampleBrief>
  Render a calendar with Chinese lunar annotations for March 2024.
</LvglExampleBrief>

A 300x300 `lv_calendar` is aligned to the top center of the active
screen with today set to 2024-03-22 via `lv_calendar_set_today_date`
and the shown month fixed by `lv_calendar_set_month_shown`. An arrow
or dropdown header is attached when available.
`lv_calendar_set_chinese_mode` enables lunar labels and the CJK font
`lv_font_source_han_sans_sc_14_cjk` is applied on `LV_PART_MAIN`.
When the Chinese calendar is disabled the example falls back to a
centered "not enabled" label.

<LvglExample name="lv_example_calendar_2" path="widgets/calendar/lv_example_calendar_2" />
