datetimepicker: update date also when handle is not yet allocated. issue #32106

git-svn-id: trunk@55435 -
This commit is contained in:
ondrej 2017-07-04 06:47:33 +00:00
parent 586c68002e
commit c727f965e6

View File

@ -2579,7 +2579,6 @@ var
WT: Array[dtpHour..dtpAMPM] of Word;
DTP: TDateTimePart;
begin
if HandleAllocated then begin
FCorrectedDTP := dtpAMPM;
FUserChangedText := False;
@ -2698,9 +2697,9 @@ begin
end;
if HandleAllocated then
Invalidate;
end;
end;
procedure TCustomDateTimePicker.DoEnter;
begin
@ -2858,7 +2857,6 @@ procedure TCustomDateTimePicker.CreateWnd;
begin
inherited CreateWnd;
UpdateDate;
if FDoNotArrangeControls then begin { This field is set to True in constructor.
Its purpose is to prevent control anchoring until this point. That's because
on Linux Lazarus crashes when control is dropped on form in designer if