[Lazarus] About TDateEdit

José Mejuto joshyfun at gmail.com
Wed Jan 11 19:55:08 CET 2017


Hello,

I have two questions about TDateEdit.

1) This control when created in the form the "Date" property is 
"NullDate", but as soon as I try to enter something (like a "1") and 
then erase it I can not recover the "NullDate" value (AKA zero). For my 
needs I subclassed it to check against "" on exit and set date to 
"NullDate" value. Is current behavior expected ?

2) When you do not write a complete date, so you write something like 
"1" and press tab, the control text property value is the "1" but "Date" 
property is updated to "01/01/2017" which IMHO is a bit 
counterintuitive. For my needs in my subclass, on exit I just set 
"Control.Date:=Control.Date" which forces a full date expansion in the 
text box.

-- 

Saludos,
	José Mejuto


More information about the Lazarus mailing list