Calendar control

Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Apr 2006
Posts: 62
Reputation: Fenerbahce is an unknown quantity at this point 
Solved Threads: 0
Fenerbahce Fenerbahce is offline Offline
Junior Poster in Training

Calendar control

 
0
  #1
Oct 10th, 2006
hi,

1-how can i do multiselect in calendar.
2-how many days between 2 dates? how can u calculate it?
example :
10/10/2006 - 12/10/2006 there is 1 day between those 2 dates.

thanks
Reply With Quote Quick reply to this message  
Join Date: Nov 2005
Posts: 95
Reputation: ManicCW is an unknown quantity at this point 
Solved Threads: 11
ManicCW's Avatar
ManicCW ManicCW is offline Offline
Junior Poster in Training

Re: Calendar control

 
0
  #2
Oct 11th, 2006
Originally Posted by Fenerbahce View Post
1-how can i do multiselect in calendar.
thanks
Select Calendar control and set SelectionMode property to DayWeek or DayWeekMonth.

Originally Posted by Fenerbahce View Post
2-how many days between 2 dates? how can u calculate it?
example :
10/10/2006 - 12/10/2006 there is 1 day between those 2 dates.
thanks
You can use DateDiff function Here is the sample:
DateDiff(DateInterval.Day, MyFirstDate, MyLastDate)-1

If you need to count days in Caledar control than simply add this in SelectionChanged event od the Calendar control:

  1. Me.Calendar1.SelectedDates.Count

Hope it helps.
Last edited by ManicCW; Oct 11th, 2006 at 10:33 am.
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 62
Reputation: Fenerbahce is an unknown quantity at this point 
Solved Threads: 0
Fenerbahce Fenerbahce is offline Offline
Junior Poster in Training

Re: Calendar control

 
0
  #3
Oct 11th, 2006
Hi ManicCW,

Thank you very much for your help. they work very well.

Kind regards
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC