Lazarus
Programming => LCL => Topic started by: talorigomat on April 25, 2017, 12:55:54 pm
-
In a previous version of my program compiled in January this year with Lazarus 1.6.2 I was able to enter symbols such as <, <=, : in the TDateEdit component. I've recompiled the program with 1.6.4 but it seems to no longer allows the entry of these symbols. Is there a property setting I can set to allow it to accept these characters again?
-
Lazarus 1.6.4. Windows 7. Put a TDateEdit in a new project on the form. Launched. Accepts any characters, including <, =, :
-
If DateOrder <> doNone then the control is masked.
IIRC when the control looses focus, illegal input will be erased.
Bart
-
I'm now getting the behaviour that Bart describes. Before I had the behaviour that ASerge describes. I created a new project and still am not able to enter the symbols. I'm using Lazarus 1.6.4 with Windows 7 on one machine and Windows 10 on another.
-
Why do you want to (be able to) enter invalid characters in a TDateEdit anyway?
It makes no sense to me whatsoever.
If you want to be able to enter anything, just use a TEdit and a TSpeedButton to open a TCalendarDialog instead.
Bart
-
Why do you want to (be able to) enter invalid characters in a TDateEdit anyway?
I've created a form for users to enter search criteria which has a routine to check whether these characters or entered. The user can use the control to add a date and/or include these characters.
-
Well, TDateEdit wasn't designed for that.
Bart
-
I've created a form for users to enter search criteria which has a routine to check whether these characters or entered. The user can use the control to add a date and/or include these characters.
I would use a separate TEdit or TComboBox for entering the desired search operator, and then use a TDateEdit for just the date value by itself.