Subject Re: KMDATEWITHCAL (dUFLP)
From Mustansir Ghor <mustan31@hotmail.com>
Date Tue, 20 Mar 2018 15:33:11 -0400
Newsgroups dbase.getting-started

Dear Ken Sir

From below message , can we download again from dUFLP in order to get updated program

I did some tinkering (also the next version, when you click a day, the
calendar will collapse/close, not sure why I didn't do that in the first
place).

Best Regards
Mustansi

Ken Mayer Wrote:

> On 3/19/2018 1:25 AM, Mustansir Ghor wrote:
> > Dear Ken Sir
> >
> > I am using kmdatewithcal.cc . An observation is made that once the date is updated in the DATEEF by onclick button of calendar it does not respond to a any methods like VALID, LOSTFOCUS etc.
> >
> > Can you advised what can be done to avail these methods
>
> In the form designer, with valid (this is particularly important), you
> need to set validRequired to true, or it won't require that the valid
> event handler do anything.
>
> I did some tinkering (also the next version, when you click a day, the
> calendar will collapse/close, not sure why I didn't do that in the first
> place).
>
> Anyway, I tested this with valid, clicked on the entryfield itself in
> the designer, selected the valid event in the inspector, and added this
> code:
>
>     function DATEEF_valid()
>        bReturn = false
>        if this.value == {} or this.value <= date() // less than or equal
> to today
>           bReturn = true
>        endif
>     return bReturn
>
>
> I set "validRequired" to true, and set a simple message with
> validMessage to "Date out of range". If the date field is empty, or if
> it has a date less than or equal to today's date, all is well, focus is
> allowed to leave the entryfield, otherwise it forces you back to the
> entryfield ...
>
> Works perfectly.
>
> Ken
>
> --
> *Ken Mayer*
> Ken's dBASE Page: http://www.goldenstag.net/dbase
> The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
> dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
> dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm