Andrew Spencer 2 Posted July 4, 2023 (edited) A TCalendarView on a TForm, with a TMemo. In the TCalendarView's OnClick event, add a line to the TMemo showing when the OnClick event happened, and the formatted and integer value of TCalendarView.Date. In Delphi 10.4.2 I am seeing that with consecutive <1Hz clicking on the same date, a "bad" date value is returned on every second click returns a null date. Also, when clicking >~1Hz, this can produce multiple "bad" dates. The "bad" date value is -700000 (if you take the Trunc() of it). Does anyone have any ideas? TCalendarViewBadDate.zip Edited July 4, 2023 by Andrew Spencer Share this post Link to post
Uwe Raabe 2057 Posted July 4, 2023 I'm a bit unsure what your example should achieve, as it doesn't match what you show here. Share this post Link to post
Lajos Juhász 293 Posted July 4, 2023 I can confirm using both OnClick and OnChange events that I can receive: 45113 -700000 45113 -700000 45113 -700000 45113 -700000 45113 -700000 45113 -700000 45113 -700000 45113 -700000 45113 -700000 45113 -700000 45113 -700000 Share this post Link to post
Andrew Spencer 2 Posted July 4, 2023 Apologies - I zipped up the wrong one. TCalendarViewInvalidDate.zip Share this post Link to post
Uwe Raabe 2057 Posted July 4, 2023 I guess, that is as designed. When you click on a date that date is selected. When you click again on the same date it is unselected and the Date property is set to NullDate: NullDate: TDate = -700000; You can avoid that when you set SelectionMode to smNone. 1 Share this post Link to post
Andrew Spencer 2 Posted July 4, 2023 Ouch! OK - that makes sense. I'll have to do a work-around for how I want it to behave. Thanks, Uwe. Share this post Link to post