Author Topic: Question Regarding Winbatch's Calendar Popup dialogue Controls: Default Date?  (Read 3430 times)

mcjathan

  • Newbie
  • *
  • Posts: 43
Hi all,

I've been examining the Winbatch example code that uses the calendar popup dialogue.  See this page:

     http://goo.gl/sVtlyo

This code uses today's date as the defaulted selected date on the calendar popup.  I would like to specify my own custom default date that will show up as the default selected date on the popup calendar.  I can't quite figure it out.  I suspect it is on this line from the sample code:
   
   Calendar001=`001,001,99,99,CALENDAR,"Calendar",Date,DEFAULT,DEFAULT,3,DEFAULT,DEFAULT`

The Winbatch help page titled "Calendar Control" says this:

Normally, when a dialog box opens, the calendar defaults to today date. You can change this by assigning a value in the format of YYY:MM:DD to the variable before calling the Dialog function.

I know the answer is right in front of me.  Will someone please throw this old dog a bone?

Best regards,

Jeff


....IFICantBYTE

  • Full Member
  • ***
  • Posts: 125
Define your "Date" variable with a valid date in the "YYYY:MM:DD" format  before your dialog line (the hours:minutes:seconds can be ignored).

ie.
Put this line before your calendar one, and it should show you Christmas this year.

Date = "2014:12:25"

Regards,
....IFICantBYTE

Nothing sucks more than that moment during an argument when you realize you're wrong. :)