Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SuperLib 3.50 - function calendvalid() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FUNCTION CALENDVALID()

  Short:
  ------
  CALENDVALID() Uses GETDATE() popup calendar function as a GET
  VALID clause


  Returns:
  --------
  <lValid> => valid condition

  Syntax:
  -------
  CALENDVALID([bValid])

  Description:
  ------------
  This sets up the popup GETDATE() calendar for use in
  a GET VALID clause. (the post validation block). If a value is
  selected, it is assigned to the get. (if ESCAPE is pressed, it
  is not) The Calendar function will pop up upon exit from a GET
  field.

  [bValid] If you pass a validation codeblock, it will
  be checked first. If the GET is already valid, according to the
  codeblock, the calculator will not be popped up. The codeblock
  must return a logical value.

  Examples:
  ---------

   proc test

   v1 := date()
   v2 := date()
   v3 := date()
   v4 := date()

   @10,10 get v1
   @11,10 get v2 when calendwhen(.f.)
   @12,10 get v3 valid calendvalid( {||v3>date()}  )
                      // note the validation block
                      // IF V3 > date(), the calendar
                      // will not be called
   @13,10 get v4

   read

  Notes:
  -------
  You might want to look at CALENDWHEN() and
  CALENDKSET() for other options.

  Source:
  -------
  S_CALCVW.PRG


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson