Page 1 of 1
TO Mr Rao : XBrDtPicker
Posted: Mon May 20, 2019 10:32 am
by Silvio.Falconi
if my price list starts from 15 June 2019 until 20 September 2019, can I block the other months on XBrDtPicker so that the user is limited?
Re: TO Mr Rao : XBrDtPicker
Posted: Mon May 20, 2019 11:50 am
by ukoenig
Silvio,
I tested to move to the defined date but nothing happens.
maybe it works in Your solution.
I created something special because of some needed / included actions
and other extras so it looks different like You can see
trying to move to the selected date with :
ACTION oCal:SetDate( oCust:HireDate, .T. ), ;
oCal:Refresh() ;
regards
Uwe
Re: TO Mr Rao : XBrDtPicker
Posted: Mon May 20, 2019 12:08 pm
by Silvio.Falconi
I can set dparam and run ok
only I cannot set a Interval of date as I ask (from ...to)
Re: TO Mr Rao : XBrDtPicker
Posted: Mon May 20, 2019 12:13 pm
by ukoenig
Silvio,
FOUND
moving to the old date works like:
ACTION oCal:SetDate( oCust:HireDate, .T. ), ; // old date from xBrowse
oCal:Change() ;
or moving back to today from a old selected date
ACTION ( cRet := oCal:SetDate( Date(), .T. ), oCal:Change() ) ;
regards
Uwe
Re: TO Mr Rao : XBrDtPicker
Posted: Sun May 26, 2019 1:23 pm
by nageswaragunupudi
This is the syntax of FWH function
XbrGetDate( dDateVal, cTitle, dMinDate, dMaxDate, lAllowBlank, nSize )
The function returns DateSelected. If no date is selected, it returns nil
Re: TO Mr Rao : XBrDtPicker
Posted: Sun May 26, 2019 2:23 pm
by Silvio.Falconi
yes, of course
I had asked if you could set a date range by limiting the end user to select a date only in the requested date range: for example the season starts from June 15th to September 15th I wanted the user could only enter a date of the period
Re: TO Mr Rao : XBrDtPicker
Posted: Sun May 26, 2019 2:30 pm
by nageswaragunupudi
Using with Get in dialog:
Code: Select all
#include "fivewin.ch"
function Main()
local dDate := Date()
local oDlg, oFont
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-20
DEFINE DIALOG oDlg SIZE 600,600 PIXEL TRUEPIXEL FONT oFont
@ 40, 200 GET dDate SIZE 200,30 PIXEL OF oDlg ;
ACTION XbrGetDate( Self, "Select Date", {^ 2019/05/15 }, {^ 2019/05/30 } ) ;
BITMAP "c:\fwh\bitmaps\32x32\calendar.bmp"
@ 200,40 BUTTON "OK" SIZE 100,30 PIXEL OF oDlg ACTION MsgInfo( dDate )
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
Re: TO Mr Rao : XBrDtPicker
Posted: Sun May 26, 2019 2:38 pm
by Silvio.Falconi
I think I not have these release ....
Re: TO Mr Rao : XBrDtPicker
Posted: Sun May 26, 2019 2:47 pm
by Silvio.Falconi
Mr Rao,
THANKS
why I see the buttons changed ( see the red box)
Re: TO Mr Rao : XBrDtPicker
Posted: Sun May 26, 2019 2:48 pm
by nageswaragunupudi
fwh\source\function\xbrgetdt.prg
Re: TO Mr Rao : XBrDtPicker
Posted: Sun May 26, 2019 2:54 pm
by Silvio.Falconi
But why I not see X ?
do you have some particular setup ?