Lv_calendar_get_today_date returns garbage


What MCU/Processor/Board and compiler are you using?


What LVGL version are you using?


What do you want to achieve?

I set a date with the correct values (year = 2024, month = 4, day = 2). When I read them back with lv_calendar_get_today_date(), I get garbage :confused:

Code to reproduce

uint8_t month = 4, day = 2;
uint16_t year = 2024;

lv_calendar_set_today_date(calendar, (uint32_t) day, (uint32_t) month, (uint32_t)year);
const lv_calendar_date_t * my_date = lv_calendar_get_today_date(calendar);

if(my_date ->year != year)
  LV_LOG("year wasn't set correctly!");

I adapted the example, so calendar is static. So no local variable issue. There is also enough heap.

Any ideas?

Just went for a work-around by storing the date myself :confused: