Right Click > Delete in TwwDBDateTimePicker
We had a customer with a large amount of dates set to 12/30/1899 and then random times.
After digging, we found that the user uses Right Click > Delete or CTRL + DEL to clear out the TwwDBDateTimePicker (they would always tab out afterwards).
This consistently results in the above. An 1899 date but a real time. I was able to replicate in a very simple application (make sure to tab out of the TwwDBDateTimePicker before posting).
We also found out the dataset needs to be in insert or edit mode for this to happen.
Delphi XE3, Woll2Woll 10.0.1.2. Also repeated in Delphi Sydney, Woll2Woll 21.0.1.4.
-
For the date to display blank, it would have to be a value of 0 which is equivalent to the 1899 date. It looks like in your screen shot that the time portion is not 00:00 so it would not display blank.
I tried a simple project and deleted the date, and both the date and time were deleted for me, so it displayed blank for me. I recommend creating a simple project we can run so we can troubleshoot the issue for you as I cannot reproduce your problem.
-
Delete works fine, but it's Right Click > Delete that's the problem (Dataset needs to be put in Insert/Edit mode first).
Attached is the project I built to demonstrate the issue. We use Advantage Database, so you'll probably need to swap out that part. Press Insert button to insert a new record, defaulting some dates to now(), and keeps it in insert mode. Then you do right-click>delete and tab out, seeing what happens in the grid
Please sign in to leave a comment.
Comments
2 comments