Confused about TPlannerCalendar events

Hello, I am changing some ovcCalendars to TPlannerCalendars and am a bit confused about what event is triggered when the date is changed (I am using multiselect=false). OnDateChange never seems to be triggered. OnDaySelect works but not if I click on the month-year at the top to change the year, so I have to also use OnMonthSelect and OnYearSelect. But then these do not get triggered if I use the triangles to move by a month or a year. I tried OnAllDaySelect but that did not do anything. How do I respond to a date change caused by using the single or double triangles ? More, to the point, is there a simpler way to respond to a date change, regardless what causes it ? Very best regards, Olivier

When you just change the month, year, either via the arrows left/right or via the dropdown, this does not change the actual selected date. The actual selected date changes when clicking a date. You can see this as the selected date is drawn with a background square in selected color as otherwise, it just shows the focused date with a transparent square. OnDaySelect is triggered when the selected date changes.
OnMonthChange is triggered when just the viewed month changes.

Hi Bruno, Thank you very much for the detailed response (as always). I will have to think about this for awhile, as I try to respond to a date change by enabling a SAVE/CANCEL button and in many cases the new date is one year later, so users just use the double-triangle to move by a year to the exact required date and are confused that the displayed (but not selected) date cannot be saved. Very best regards, Olivier

I think the confusion comes from the difference in just navigating the calendar versus selecting a date in the calendar. Navigation does not imply selection.

It's the focus frame which is confusing users. For example, when they have January 10, 2025, selected and click the double-triangles they get to January 10, 2026, with that date framed. To them it looks like the date is selected. Is there an option to not display the frame ?

There is currently not a setting to hide this.
Best we can do is introduce a new ShowFocus: boolean property with which this can be controlled.

Is there an event that would let me respond to a change in the focused date (and set the selected date = the focused date) ?

A new event OnFocusDateChange will be added in the next release

Fantastic.
Thank you very much !

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.