Show future date with calendar header dropdown

the list of years in lv_calendar_header_dropdown.c begins in 1901 and ends in 2023, and i think it’s more useful to have the possibility to select future dates,

static const char * year_list = {

and in 2 places in code same file it’s written 2023 as a year of reference :

ligne 123 :     newd.year = 2023 - sel;

ligne 135 :     lv_dropdown_set_selected(year_dd, 2023 - cur_date->year);

is it possible to have possibility to detect and not write the value directly ?

kind regards


Sounds good!

We could add more years e.g. until 2040 and if we want to start at 2030 we can just use a pointer like:

&year_list[5 * 10];  //5 characters per year, jump 10 years.

Actually we don’t have to store the start year as we can read it from the drop down’s options.