Recent

Author Topic: JvValidators for TDateTimePicker  (Read 5752 times)

chrv

  • Jr. Member
  • **
  • Posts: 58
JvValidators for TDateTimePicker
« on: June 30, 2021, 08:34:56 pm »
Is it possible to check if a TDateTimePicker is null using TJvRequiredFieldValidator ?
Win32 Lazarus 2.0.12 FPC 3.2.0

devEric69

  • Hero Member
  • *****
  • Posts: 648
Re: JvValidators for TDateTimePicker
« Reply #1 on: July 06, 2021, 06:44:45 pm »
For information, in the LCL compatible Jedi framework, TJvValidators is handy, and was created for this: you can create validators items (several TJvCustomValidator items inside a TJvValidators component) in order to validate all types of input values (check the right type, in a good range, ...). Each specialized TJvCustomValidator item can point to an input control (TEdit, TMaskEdit, TJv..., ...\...), obtaining the value to be validated.
« Last Edit: July 06, 2021, 08:05:17 pm by devEric69 »
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

chrv

  • Jr. Member
  • **
  • Posts: 58
Re: JvValidators for TDateTimePicker
« Reply #2 on: July 12, 2021, 10:13:08 am »
Hi,
(Back to work)
Thank you for reply.

I don't understand why my options are different from yours in JvValidator item editor (see screenshot)
(Windows 10, Lazarus 2.0.12, FPC 3.2.0)
I downoded JvValidatorsLazr.lpk 1.0.6.0 from Online Package Manager.

Thank you.
Win32 Lazarus 2.0.12 FPC 3.2.0

chrv

  • Jr. Member
  • **
  • Posts: 58
Re: JvValidators for TDateTimePicker
« Reply #3 on: July 21, 2021, 05:10:59 pm »
Quick and dirty solution.
Sure, there a far better ones ...
Win32 Lazarus 2.0.12 FPC 3.2.0

devEric69

  • Hero Member
  • *****
  • Posts: 648
Re: JvValidators for TDateTimePicker
« Reply #4 on: July 21, 2021, 05:43:53 pm »
I don't understand why my options are different from yours in JvValidator item editor (see screenshot)
I downoded JvValidatorsLazr.lpk 1.0.6.0 from Online Package Manager.

I'm using an older one: lpk v. 1.0.5.0, from Online Package Manager too.
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

chrv

  • Jr. Member
  • **
  • Posts: 58
Re: JvValidators for TDateTimePicker
« Reply #5 on: July 25, 2021, 05:19:07 pm »
Hi all,

Have finally succeded to improve the way i can use TDateTimePicker with TJvValidators. It works fine for me.
I joint 1 little app to show the way i solved my problem.
The second zip is the same as the first one  except it works even if you don't have TJvValidator installed on your Lazarus
Win32 Lazarus 2.0.12 FPC 3.2.0

 

TinyPortal © 2005-2018