DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   ASP.NET (http://www.daniweb.com/forums/forum18.html)
-   -   Calendar control (http://www.daniweb.com/forums/thread57640.html)

Fenerbahce Oct 10th, 2006 12:25 pm
Calendar control
 
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

ManicCW Oct 11th, 2006 10:31 am
Re: Calendar control
 
Quote:

Originally Posted by Fenerbahce (Post 262015)
1-how can i do multiselect in calendar.
thanks

Select Calendar control and set SelectionMode property to DayWeek or DayWeekMonth.

Quote:

Originally Posted by Fenerbahce (Post 262015)
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.

Fenerbahce Oct 11th, 2006 9:59 pm
Re: Calendar control
 
Hi ManicCW,

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

Kind regards


All times are GMT -4. The time now is 5:02 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC