User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 402,366 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,069 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 2276 | Replies: 2
Reply
Join Date: Apr 2006
Posts: 62
Reputation: Fenerbahce is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Fenerbahce Fenerbahce is offline Offline
Junior Poster in Training

Calendar control

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2005
Location: Mostar
Posts: 88
Reputation: ManicCW is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 10
ManicCW's Avatar
ManicCW ManicCW is offline Offline
Junior Poster in Training

Re: Calendar control

  #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:

Me.Calendar1.SelectedDates.Count

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

Re: Calendar control

  #3  
Oct 11th, 2006
Hi ManicCW,

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

Kind regards
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 12:02 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC