procedure TsCustomDateEdit.PopupWindowShow;
begin
if FPopupWindow = nil then begin
if sPopupCalendar <> nil then
sPopupCalendar.Close;
FPopupWindow := TsPopupCalendar.Create(Self);
end
else
if (sPopupCalendar <> nil) and (sPopupCalendar <> FPopupWindow) then
sPopupCalendar.Close;
sPopupCalendar := TForm(FPopupWindow);
TsPopupCalendar(FPopupWindow).Font.Assign(Font);
if Assigned(OnGetPopupFont) then
OnGetPopupFont(Self, TsPopupCalendar(FPopupWindow).Font);
TsPopupCalendar(FPopupWindow).FCalendar.MaxDate := MaxDate;
TsPopupCalendar(FPopupWindow).FCalendar.MinDate := MinDate;
TsPopupCalendar(FPopupWindow).FCalendar.Animated := Animated; // *** DB *** Added
if Self.Date <> NullDate then
TsPopupCalendar(FPopupWindow).FCalendar.CalendarDate := Self.Date
else
TsPopupCalendar(FPopupWindow).FCalendar.CalendarDate := SysUtils.Date;
TsPopupCalendar(FPopupWindow).FCalendar.ControlStyle := TsPopupCalendar(FPopupWindow).FCalendar.ControlStyle – [csDoubleClicks];
TsPopupCalendar(FPopupWindow).FEditor := Self;
UpdatePopup;
inherited;
end;