unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls;

type
  TForm1 = class(TForm)
    MonthCalendar1: TMonthCalendar;
    Label1: TLabel;
    Button1: TButton;
    Label2: TLabel;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var data: TDate;
    liczba_dni,i: integer;
begin
  Label1.Caption:='';
  data:=MonthCalendar1.Date;
  liczba_dni:=Round(MonthCalendar1.EndDate-data);
  //Label1.Caption:='Początek='+DateToStr(MonthCalendar1.Date)+#13+'koniec='+Datetostr(MonthCalendar1.EndDate);
  for i:=0 to liczba_dni-1 do
  begin
    Label1.Caption:=Label1.Caption+DateToStr(data)+#13;
    data:=data+1;
  end;

end;

end.
