unit uDateSpr;

interface

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

type
  TfrmDateSpr = class(TForm)
    SprPicker: TDateTimePicker;
    Label1: TLabel;
    OKBtn: TButton;
    CancelBtn: TButton;
    procedure FormCreate(Sender: TObject);
    procedure FormKeyPress(Sender: TObject; var Key: Char);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmDateSpr: TfrmDateSpr;

implementation

uses uSVDM;

{$R *.dfm}

procedure TfrmDateSpr.FormCreate(Sender: TObject);
begin
  SprPicker.Date := now();
end;

procedure TfrmDateSpr.FormKeyPress(Sender: TObject; var Key: Char);
begin
  if Key = #13 then
    SelectNext(ActiveControl as TWincontrol, true, true);
end;

end.

