469,913 Members | 2,002 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,913 developers. It's quick & easy.

Calendar Date Block

I am trying to block certain dates in the calendar to be Selectable. I have been able to do this for weekends ..

CODE

If e.Day.IsWeekend Then
e.Day.IsSelectable = False

/CODE

But I am not able to figure out a way to get weekends.

But I do know a round about way to do this..

CODE

If e.Day.Date.Day = Convert.ToDate(d, HolidayList.SelectedItem.Text) And e.Day.Date.Month = Convert.ToDate(m, HolidayList.SelectedItem.Text) Then
e.Day.IsSelectable = False

/CODE

While this could work, is there an easier way out?
Oct 3 '07 #1
1 1481
jhardman
3,406 Expert 2GB
Phoenix,

That's about the best way I can think of. for weekend you can use the weekDay() function which should return a number (if I remember right, it's been a while) 1-7 or 0-6 and you could block out certain numbers, but this doesn't save you much in terms of programming space or processor time.

Jared
Oct 4 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by cg_news | last post: by
19 posts views Thread by Stimp | last post: by
5 posts views Thread by Don | last post: by
3 posts views Thread by thorpk | last post: by
12 posts views Thread by Geoff Berrow | last post: by
1 post views Thread by swethak | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.