Page 1 of 1

DATEPICKER

PostPosted: Mon Feb 26, 2024 10:01 am
by Ruth
Dear friends,


I have a datepicker in my dialog and now I am trying to disable dates in the past from selection.
maybe someone would be kind enough to give me a little hint. I was wondering if there is a way to set minimum and maximum and leaving the dates out of this range disabled also visually...to achieve kind of this look

Image

this is my datepicker right now:

Code: Select all  Expand view
REDEFINE DTPicker oCal1 VAR dDate1 UPDATE OF oDlg ID 4019 ON CHANGE (f_datumneu(cCombo, dDate1, dDate2, oDlg, oBrw, oBrw2), cSayAusgewaehlt := "Abfragedatum: "+dtoc(dDate1), oSayAusgewaehlt:refresh())
 


thank you very much already and kind regards to all
Ruth

Re: DATEPICKER

PostPosted: Mon Feb 26, 2024 11:09 am
by nageswaragunupudi
Code: Select all  Expand view
oCal1:SetRange( dFirst, dLast )

Re: DATEPICKER

PostPosted: Mon Feb 26, 2024 5:18 pm
by Ruth
Dear Mr. Rao,

thank you very much for your answer. This is working wonderfully.
Through searching the forum etc. I also found dtprang1.prg in samples and it is just what I was looking for. Thank you for making this :-)

and also a polite question: is it allowed to copy what´s in samples and integrate it in someone´s own code and what copyrights etc should I mention in case?

again very kind regards and have a nice evening
Ruth

Re: DATEPICKER

PostPosted: Tue Feb 27, 2024 4:44 am
by nageswaragunupudi
is it allowed to copy what´s in samples and integrate it in someone´s own code and what copyrights etc should I mention in case?


You can freely use the code if it works for you.
No restrictions.

Re: DATEPICKER

PostPosted: Tue Feb 27, 2024 7:36 am
by Ruth
This is amazing, dear Mr. Rao. Thank you :-) Kind regards to all Ruth