I wish to show a small calendar to select a date ...
I wish return the value od dFecha and close the odlg...
I click on one day but then not close the calendar
I use this :
@ 10,100 GET oGet2 VAR dEnd ... bitmap"d_ca.bmp" action show_cal(dFechapres,oGet2)
Function show_cal(dFechapres,oControl)
Local oDlg, oCal
Local lOk := .f.
Local dFecha := Iif(Empty(dFechaPres), Date(), dFechaPres)
DEFINE DIALOG oDlg FROM 0, 0 TO 150, 170 PIXEL
@ 0, 0 CALENDAR oCal VAR dFecha OF oDlg PIXEL DAYSTATE size 85,75 ;
ACTION ( lOk := .t., oDlg:End())
ACTIVATE DIALOG oDlg ON INIT oCal:move(0,0)
if lOK
oControl:cText( oCal:dDate )
endif
return nil