FocusLost not working for DesktopDateTimePicker

Hello,

I must be making a really basic error but I don’t get it.
Using Xojo 2022r1 on Win11.

I have a DesktopDateTimePicker with a FocusLost event with code:

dp_end_saving.SelectedDate = me.SelectedDate.AddInterval(0,0,1)
MessageBox(me.SelectedDate.AddInterval(0,0,1).ToString)

(yes I know, don’t debug with MessageBoxes. But that is desperation :wink:

By clicking on the control it gets the focus, I can change the date values and then, hitting tab or clicking a different control, the FocusLost event should fire (in my opinion), but it doesn’t.
Why?

Thanks in advance!

1 Like

I have the same issue. It may be a bug.

1 Like

File an Issue report: https://issues.xojo.com/

Thanks John and Rick.

Done → #69684

I have been told to wait for next xojo release.
Not sure if that means that it will be fixed until then or that I should hope it “goes away”.
Let’s see!

Was this ever fixed? I’m having the exact same issue and I’m using Xojo 2023r1.1 on a MacBook Pro M1

Hello Anthony,

I don’t know.
Then I was told to wait for next release and check again, if I remember correctly. And I also remember me being surprised about that way to handle issues, so I decided to take a closer look at python with tkinter and ttkbootstrap :wink:

Don’t misunderstand me. I really love Xojo! I tried to divorce and cheated with c#, winforms and winui, Lazarus (Delphi was one of my first loves) and even with Java and swing (yep, not all attractions are explainable) but always came back to Xojo.
… nevertheless I didn’t appreciate that issue handling :smiley: and I never heard back.

https://tracker.xojo.com/xojoinc/xojo/-/issues/69684

I’ve made a test. When tabbing into and out from a date field it fires the focus events, but… not when using mouse clicks. It does not fire any focus event entering or leaving using the mouse.

Tested on a Windows 11 machine.