Using the following code:
- Code: Select all Expand view
- #include "fivewin.ch"
#include "calendar.ch"
#define DS_3DLOOK 0x0004
#define DS_MODALFRAME 0x80
#define WS_POPUP 0x80000000
#define WS_CHILD 0x40000000
#define WS_MINIMIZE 0x20000000
#define WS_VISIBLE 0x10000000
function pickdate()
local oDlg, oCal, dDate
set century on
set date british
set epoch to 1980
dDate := date()
define dialog oDlg TITLE "Test Calendar" from 0,0 to 300, 300 pixel ;
style nOr(DS_MODALFRAME, DS_3DLOOK, WS_POPUP, WS_VISIBLE)
@ 0,0 CALENDAR oCal VAR dDate OF oDlg PIXEL ;
DBLCLICK (msginfo( oCal:GetDate() ), oDlg:end() ) ;
ON CHANGE msginfo( oCal:GetDate() )
activate dialog oDlg
return nil
I got this (4 months)
But testcal2.prg in samples shows only 1 month which is what I wanted. What's wrong with my code?
p.s. Any documentation on this control? The wiki has an entry but there's no description on its usage. Only syntax is shown.
TIA