Live Chat Icon For mobile
Live Chat Icon

How to display multiple dates selected in Calendar Control

Platform: ASP.NET| Category: Calendar

Set the SelectionMode property of Calendar Control to DayWeek/ DayWeekMonth.

Code for the OnSelectionChanged as follows:

VB.NET


Dim day As DateTime
Dim strval As String
For Each day In Calendar1.SelectedDates
	strval += (day.Date.ToShortDateString() & '<br>')
Next
Response.Write(strval)

C#


string strval='' ;
foreach (DateTime day in Calendar1.SelectedDates)
{
	strval += (day.Date.ToShortDateString() + '<br>');
}
Response.Write(strval);
}

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.