How check date BEFORE select new date in TAdvSmoothDatePicker

Good afternoon to all,
in TAdvSmoothDatePicker there is a way to check the new date BEFORE changing it?
Example today 10/05/2024 i have some notes to save. I select a new date 01/05/2024 i need to ask if save or not the notes. If yes i do not change the date, if not i change the date.

Thank you
Best regards
Daniele

I Got one solution .... not so much elegant ... but works.
I declared a variable "Circular : Boolean" in my form setted as False and CurrentDate : TDate setted as Today (in form create).

In TAdvSmoothDatePicke.OnChange event i do

TAdvSmoothDatePicker.OnChange(Sender: TObject);
Begin
  // Check for circular
  if Circular then
  begin
    Circular:=False;
    Exit;
  end;
  if Some condition not accorded then // Don't change the date
  begin
    Show something
    Circular:=True;
    TAdvSmoothDatePicker.Date:=CurrentDate;
  end
  else
  begin
    do what is needed if the new date is good...
    CurrentDate:=DP.Date;
  end;
End;

Not elegant ... but work ...
If there is something esle better then this ... is very welcomed ...

Best regards
Daniele

That is a possible way. OnChange of course triggers for every change made in the date picker. Perhaps an alternative solution is via OnExit that is only triggered upon leaving the control after editing?

Good afternoon Bruno,
thank's for reply.

I tried with on exit but it does not fired when i select the date because, and this way is the rigth way, it is fired when i exit (with tab key or enter in other one) from it.

Currently in my program TAdvSmoothDatePicke has CanEdit:=False to avoid wrong input date. So, work with calendar i can only use ESC (in order to close the calendar) or select one date. If i select the date i'll need to do some controls in order to validate the date. Last question, what does the onValueValidate ??

Thank's for all

Best regards
Daniele

If you have disabled editing, I would expect that date changes then only happen via clicking on the calendar and you can use the OnSelectDate() event?

Good morning Bruno,
tho be honest .... i miss this event ....

Excuse me !!

Thank's for your help.

Have nice week end

Daniele