datetimectrls - prevent calendar drop when day is not shown

git-svn-id: trunk@44336 -
This commit is contained in:
zoran 2014-03-04 04:26:23 +00:00
parent 02b09d18e6
commit 58e0398461

View File

@ -881,7 +881,6 @@ procedure TCustomDateTimePicker.SetKind(const AValue: TDateTimeKind);
begin begin
if FKind <> AValue then begin if FKind <> AValue then begin
FKind := AValue; FKind := AValue;
UpdateShowArrowButton(FDateMode, AValue);
AdjustEffectiveHideDateTimeParts; AdjustEffectiveHideDateTimeParts;
end; end;
end; end;
@ -1767,6 +1766,7 @@ begin
MoveSelectionLR(False); MoveSelectionLR(False);
FRecalculatingTextSizesNeeded := True; FRecalculatingTextSizesNeeded := True;
UpdateShowArrowButton(FDateMode, FKind);
UpdateDate; UpdateDate;
end; end;
end; end;
@ -3549,7 +3549,8 @@ begin
DestroyUpDown; DestroyUpDown;
end else begin end else begin
ReallyShowArrowButton := (NewDateMode = dmComboBox) and (NewKind <> dtkTime); ReallyShowArrowButton := (NewDateMode = dmComboBox) and
not (dtpDay in FEffectiveHideDateTimeParts);
if (ReallyShowArrowButton <> Assigned(FArrowButton)) or if (ReallyShowArrowButton <> Assigned(FArrowButton)) or
(Assigned(FArrowButton) = Assigned(FUpDown)) then begin (Assigned(FArrowButton) = Assigned(FUpDown)) then begin