DatePicker no cancel detection

Once DatePicker is launched there is no method to catch if the user selects "Cancel"

.AfterDateSet does not detect it. There simply is no event when it is "unlaunched" / closes by cancellation.

Does anyone have a method or know of an extension to catch cancel?

Maybe something like this:

After cancel:

After selecting:


Thank you for the idea @Anke . I would still be at the mercy of .AfterDateSet or a limited timeout by the clock :frowning: Seems there is no solution for this.

What does that mean, what's the problem?

:question: :upside_down_face: :thinking:

:question: :upside_down_face:

.AfterDateSet will tell me they did not press "Cancel"
A Clock of X seconds will tell me they did nothing but what if the user still has DatePicker open after X seconds?

Let me clarify by using a picture; an ideographic demonstration:

Try this (very similar)

Yes very similar:
.AfterDateSet does not work in detecting "Cancel" because it simply is not activated when canceling. Actually .AfterDateSet should be labeled .OKselected ! It is ONLY triggered by pressing the "OK" button

.TouchDown launches DatePicker

Therein lies the problem: the timer would either be enabled forever or need a second timer of X length to shut it off. Hence the user has X time to respond. If user does not respond in X time there is no way to forcibly "UN"launch Datepicker :frowning: :roll_eyes:

P.S. Why the heck they put a Cancel button at all? if there is nothing to catch cancel then what good is it? pressing OK without changing the date setting would have the same result !!!!

Suggest then that you build your own datepicker...this can be done with components and an extension(if you require a dialog and not just an arrangement)

Here is an example from @ABG in 2019

You can find a dialog type extension here:

1 Like

Thank you TIM