DatePicker Control

HMG Tutor 12

Getting Dates (The DatePicker Control)

The easiest way to get dates from user is the datepicker control.

@ 10,10 DATEPICKER Date_1

#include "hmg.ch"
Function Main
DEFINE WINDOW Win_1 ;
   AT 0,0 ;
   WIDTH 400 ;
   HEIGHT 200 ;
   TITLE 'Tutor 12 - DatePicker Test' ;
   MAIN
   DEFINE MAIN MENU
      POPUP "First Popup"
         ITEM 'Change DatePicker Value' ACTION ; 
            Win_1.date_1.Value := Date()
         ITEM 'Retrieve DatePicker Value' ACTION  ;
            MsgInfo ( dtoc(Win_1.Date_1.Value))
      END POPUP
   END MENU
   @ 10,10 DATEPICKER Date_1
END WINDOW
ACTIVATE WINDOW Win_1
Return

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.