![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 5 of 5 total |
![]() |
Fri, May 9 2014 1:50 PM | Permanent Link |
Sergei Safar | Hi,
I tried the code below but it never gets into the exception: procedure TForm1.Edit1Exit(Sender: TObject); var S : DateTime; begin try S := StrToDate(Edit1.Text); ShowMessage(DateToStr(S) + ' is a valid date'); except ShowMessage('Invalid date!'); end; end; Best regards, Sergei Safar |
Sat, May 10 2014 5:05 AM | Permanent Link |
Matthew Jones | > I tried the code below but it never gets into the exception:
1. What dates are you entering? 2. Have a look at the framework code to see what it is doing. 3. Give them a date picker - I think I saw someone post one in the attachments topic. Wouldn't be hard to do anyway and much more reliable. -- Matthew Jones |
Sat, May 10 2014 6:31 AM | Permanent Link |
Uli Becker | Sergei,
> I tried the code below but it never gets into the exception: Because there isn't any exception to raise: it's different from Delphi. In Javascript you will get "NaN" ( = NotANumber, which is a string) instead of an exception. Didn't you see "NaN/NaN/NaN is a valid date" in your first ShowMessage? Uli |
Tue, May 13 2014 1:46 PM | Permanent Link |
Sergei Safar | Hi Matthew,
thanks for the reply. > 3. Give them a date picker - I think I saw someone post one in the attachments topic. Wouldn't be hard to do anyway and much more reliable. Datepick2 in the Elevate Web Builder Demos and Examples did the job. Thank you. Best Regards, Sergei Safar |
Tue, May 13 2014 1:55 PM | Permanent Link |
Sergei Safar | Hi Uli,
> Didn't you see "NaN/NaN/NaN is a valid date" in your first ShowMessage? Yes, that's right. The NaN's were there. I need to open my mind: Delphi <> JS Best regards, Sergei Safar |
This web page was last updated on Sunday, March 26, 2023 at 04:50 AM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |