unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls;
type
TMinhaData = class helper for TMonthCalendar
public
function DataH(data: TDateTime): string;
end;
TForm1 = class(TForm)
Button1: TButton;
MonthCalendar1: TMonthCalendar;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{ TMinhaData }
function TMinhaData.DataH(data: TDateTime): string;
begin
Result:= FormatDateTime('dd/mm/yyyy', data);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage(MonthCalendar1.DataH(now));
end;
end.