944,074 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 4318
  • ASP.NET RSS
Oct 10th, 2006
0

Calendar control

Expand Post »
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
Similar Threads
Reputation Points: 15
Solved Threads: 0
Junior Poster in Training
Fenerbahce is offline Offline
62 posts
since Apr 2006
Oct 11th, 2006
0

Re: Calendar control

Click to Expand / Collapse  Quote originally posted by Fenerbahce ...
1-how can i do multiselect in calendar.
thanks
Select Calendar control and set SelectionMode property to DayWeek or DayWeekMonth.

Click to Expand / Collapse  Quote originally posted by Fenerbahce ...
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:

ASP.NET Syntax (Toggle Plain Text)
  1. Me.Calendar1.SelectedDates.Count

Hope it helps.
Last edited by ManicCW; Oct 11th, 2006 at 10:33 am.
Reputation Points: 12
Solved Threads: 11
Junior Poster in Training
ManicCW is offline Offline
95 posts
since Nov 2005
Oct 11th, 2006
0

Re: Calendar control

Hi ManicCW,

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

Kind regards
Reputation Points: 15
Solved Threads: 0
Junior Poster in Training
Fenerbahce is offline Offline
62 posts
since Apr 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: clear form data
Next Thread in ASP.NET Forum Timeline: Debug Settings???????





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC