I am using v9.2.2 & I also checked the latest master version.
It seems there is no ‘Close’ button specific to the Calendar widget (such as in a msgbox, where you can add a dedicated close button without creating a callback ).
If the user opens the calendar and then changes his mind, the only way they can close it is by selecting a date (which triggers their callback which should delete the calendar object).
My workaround is to create a ‘Close’ button at the right side of the header, with a callback to delete the calendar when clicked.
A close button on the lines of the msgbox widget would be very convenient.
for Example: lv_calendar_add_close_button(myCalendar)
Yes, I thought about that, but it takes up valuable real estate especially if you add the Header for year & month selection, especially for small displays (mine is a 4.3")
In which case there would be a message box header just for the close button, and another for the calendar, which won’t look so nice
I am attaching an image of how my workaround looks like.
Hope the close button will be considered in upcoming version.
Your fix looks really good, Royce. Adding a close button like that is a clever idea for smaller screens. Maybe it’s not something to add as a default feature, but sharing your example would surely help others.