I use the built in Filtering capability of the TwwDBGrid a lot.
A User just got an application error "'20-Nov-18' is not a valid date." which they had entered "20-Nov-18" into a date filter and clicked OK. Should have been "20/11/2018".
Is there some place I can add some validation for the filters before they cause an error?
Regards & TIA,
I believe the grid filtering does not currently support alpha characters for months in the ShortDateFormat. Unfortunately I don't see a workaround for this right now without making some significant changes to our code. We could make changes in the future, but the changes would break binary compatibility so it would not appear until the next major update of Delphi. As a workaround, can your users now use 'dd-mm-yyyy' instead?
Please post all your filter dialog property settings (Copy in the IDE, and then paste into your message). The answer is different depending upon how you have it configured. If you are using fdbyquerymoyify, you could use the OnEncodeDateTime event. You could also see if the OnEncodeValue event would help you here. However, it might be that these events are fired too late for you.