E
E
Evgeny Ivanov2016-08-31 09:44:01
Delphi
Evgeny Ivanov, 2016-08-31 09:44:01

Invalid argument to date encode error - what is it?

Delphi 7 development environment. OS Windows 7 x64.
The system was checked by KIS8 antivirus with up-to-date databases - no viruses. I don't disable antivirus at all.
System updates are disabled. Didn't install anything new. Only I have access to the computer.
There was no such error before. This error appeared today, in all projects, when launching any exe written in Delphi (where DateTimePicker is used, when clicking on the arrows).
Run exe without compiling.
The error appeared in the programs that I created yesterday and a month ago and today. Wherever the DateTimePicker is used - where we change its value.
Example
I create a new project, put a DateTimePicker component on the form.
I change its properties:
Format MM.yyyy
DateMode dmUpDown.
Further, if you press the down arrow 2 times, this error will appear (debugger window or message box, when starting exe - invalid argument to date encode).
The first time the date will change, the second - a window with an error. After pressing ok, the date in the field will be deleted ( . )
1703c75fbdea41cfb53458c75f0fadd4.jpg
I noticed that if you change the DateMode properties from the dmUpDown I set to the default dmUpDown, the error will disappear.
The error does not appear if you change the year using the arrows. And if the month (as highlighted in the picture 08) - then it appears.
What is it and why did the error appear?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kalapanga, 2016-08-31
@logpol32

Today is the 31st. It, you understand, is not suitable for every month. :)
To scroll a date in your format (MM.yyyy), you need to provide a valid day, such as the first number.
And you probably have the current date in the Date property and the scrolling starts from it or something similar.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question