Recent

Author Topic: TDateEdit  (Read 2294 times)

Hansvb

  • Hero Member
  • *****
  • Posts: 618
TDateEdit
« on: October 23, 2014, 09:55:13 pm »
in the acceptDate from TDateEdit i want to get the date which is selected. And not the dat in DateEdit.Text.
This because i want to do something like this:

Code: [Select]
procedure TFrm_Registratie.DateEdit_Max_DateAcceptDate(Sender: TObject;
  var ADate: TDateTime; var AcceptDate: Boolean);
var
  Present           : TDateTime;
  Year, Month, Day  : Word;
begin
  Present := Now;                             
  DecodeDate(Present, Year, Month, Day);       

  if  StrToDateTime(DateEdit_Max_Date.Text) < Present then  //.text is wrong get the selected date. how?
    begin
      MessageDlg('Program will stop!.', mtInformation,[mbOk],0);
    end;

end;

How to get the selected date?

Bart

  • Hero Member
  • *****
  • Posts: 5290
    • Bart en Mariska's Webstek
Re: TDateEdit
« Reply #1 on: October 23, 2014, 10:14:07 pm »
Maybe asking the really obvious: isn't it in the ADate parameter?

Bart

Hansvb

  • Hero Member
  • *****
  • Posts: 618
Re: TDateEdit
« Reply #2 on: October 25, 2014, 09:04:55 pm »
I see. Really simple.

Code: [Select]
if  ADate < Now then

works fine

 

TinyPortal © 2005-2018