To add event handlers to Native controls, you have to add a few lines of code yourself.
- Declare a variable of the control type, in the
Scriptsection - Get the reference to the native control
- Add the handler
- Dispose of the event handler
- Create the actual handler function
You would have had one issue to overcome, that I don’t know how to do off the top of my head. That would be to stop the form from closing, when those date conditions aren’t met.

