unit uEditorElegirFechaVencimiento; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, cxControls, cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit, cxCalendar, ExtCtrls, uEditorBasico, uIEditorElegirFechaVencimiento, cxGraphics, DB, uDAInterfaces, uDADataTable, cxDBEdit, uEmpresasController; type TfEditorElegirFechaVencimiento = class(TfEditorBasico, IEditorElegirFechaVencimiento) Label1: TLabel; bAceptar: TButton; bCancelar: TButton; Label2: TLabel; Panel1: TPanel; Label3: TLabel; cbFechaVencimiento: TcxDateEdit; procedure FormShow(Sender: TObject); private FFechaVencimiento: datetime; function GetFechaVencimiento: datetime; procedure SetFechaVencimiento(const Value: datetime); public property FechaVencimiento: datetime Read GetFechaVencimiento write SetFechaVencimiento; end; implementation {$R *.dfm} uses uFactuGES_App, DateUtils; procedure TfEditorElegirFechaVencimiento.FormShow(Sender: TObject); begin cbFechaVencimiento.EditValue := DateOf(Date); end; function TfEditorElegirFechaVencimiento.GetFechaVencimiento: datetime; begin Result := cbFechaVencimiento.EditValue; end; procedure TfEditorElegirFechaVencimiento.SetFechaVencimiento(const Value: datetime); begin cbFechaVencimiento.EditValue := Value; end; end.