feature(calendar): add interface to set a custom year list (#5227)

This commit is contained in:
Carlos Diaz
2024-01-10 20:26:47 -06:00
committed by GitHub
parent 00825c1ff6
commit 87e9d549b1
5 changed files with 70 additions and 2 deletions

View File

@@ -74,6 +74,14 @@ looks like ``const char * day_names[7] = {"Su", "Mo", ...};`` Only the
pointer of the day names is saved so the elements should be static,
global or constant variables.
Custom year list
----------------
Sets a custom year list with :cpp:expr:`lv_calendar_header_dropdown_set_year_list(calendar, years_list)`
where ``years_list`` is a pointer to the custom years list. It can be a constant string
like ``static const char * years = "2023\n2022\n2021\n2020\n2019";``,
or can be generated dynamically into a buffer as well.
.. _lv_calendar_events:
Events