Monday, March 26, 2012

simple calendar control question

How can I check to see if they selected something?

if mycal.selecteddate="" gives an error invalid cast from string to date or
something
what is the proper way to check this

Thanks,

ShaneI just decided to set
..selecteddate=.todaysdate property

but still when calendar first loads it doesn't show a selection and appears
we could check if they made one.

Shane

"SStory" <TheStorys@.TAKEOUTTHISSPAMBUSTERsofthome.net> wrote in message
news:OmUvSX3MEHA.1348@.TK2MSFTNGP12.phx.gbl...
> How can I check to see if they selected something?
> if mycal.selecteddate="" gives an error invalid cast from string to date
or
> something
> what is the proper way to check this
> Thanks,
> Shane
You can use

if(cal.SelectedDates.Count>0) .....

"SStory" wrote:

> I just decided to set
> ..selecteddate=.todaysdate property
> but still when calendar first loads it doesn't show a selection and appears
> we could check if they made one.
> Shane
> "SStory" <TheStorys@.TAKEOUTTHISSPAMBUSTERsofthome.net> wrote in message
> news:OmUvSX3MEHA.1348@.TK2MSFTNGP12.phx.gbl...
> > How can I check to see if they selected something?
> > if mycal.selecteddate="" gives an error invalid cast from string to date
> or
> > something
> > what is the proper way to check this
> > Thanks,
> > Shane
>
Hey great solution.
I will try that.

Never thought of it.

Shane

"Y.Argon" <Y.Argon@.discussions.microsoft.com> wrote in message
news:C0828BEA-30E8-4C87-B80D-55923F65758F@.microsoft.com...
> You can use
> if(cal.SelectedDates.Count>0) .....
> "SStory" wrote:
> > I just decided to set
> > ..selecteddate=.todaysdate property
> > but still when calendar first loads it doesn't show a selection and
appears
> > we could check if they made one.
> > Shane
> > "SStory" <TheStorys@.TAKEOUTTHISSPAMBUSTERsofthome.net> wrote in message
> > news:OmUvSX3MEHA.1348@.TK2MSFTNGP12.phx.gbl...
> > > How can I check to see if they selected something?
> > > > if mycal.selecteddate="" gives an error invalid cast from string to
date
> > or
> > > something
> > > what is the proper way to check this
> > > > Thanks,
> > > > Shane
> >

0 comments:

Post a Comment