anchor.diff:      FMonthsPopupMenu.Close;
       FreeAndNil(FMonthsPopupMenu);
     end;
  +
  +  if Assigned(FYearPopupWindow) then
  +  begin
  +    FYearPopupWindow.Close;
  +    FreeAndNil(FYearPopupWindow);
  +  end;
  +end;
  +
  +procedure TfpgPopupCalendar.YearPopupWindowClose(Sender: TObject);
  +begin
  +  Year := FYearPopupWindow.Year;
   end;
   
   function TfpgPopupCalendar.GetDateElement(Index: integer): Word;
  
positive.code:     FSelectedColor: TfpgColor;
      FSingleClickSelect: boolean;
      FMonthsPopupMenu: TfpgPopupMenu;
      function    GetDateElement(Index: integer): Word;
      procedure   PopulateDays;
      procedure   CalculateMonthOffset;
  
negative.code: begin
    if Assigned(FMonthsPopupMenu) then
      FMonthsPopupMenu.Free;
    if Assigned(FYearPopupWindow) then
      FYearPopupWindow.Free;
    FntBold.Free;
    FntNorm.Free;
    inherited Destroy;
  