How to: Control User Date Selection in a Calendar Web Server Control
You can specify that users can select individual days, individual weeks, or an entire month in the Calendar control. Alternatively, you can disable day selection altogether.
To control user date selection
Set the Calendar control'sproperty to one of the values defined in the SelectionMode enumeration: Day, DayWeek, or DayWeekMonth. To disable all date selection, set the property to None.
Users can only select a single day, a single week, or the whole month. However, in code you can select any arbitrary set of dates. For details, see.
When selection is enabled, the form is submitted whenever the user selects a day, week, or month, and an event is raised for which you can create a method. For details, see.
To allow the user to select a date, the calendar is displayed with links. Individual days contain a link with the date number. If you set the calendar to allow users to select a week or the whole month, an extra column with selection links is added to the left of the calendar.
You can also control date selection for individual days. For example, you might specify that users can click specific days of the month, such as holidays. For details about customizing days in this way, see.
You can specify the text for the week and month selection links.
To specify week and month selection link text
Set theand properties to the text you want to use for the navigation links.
You can also set the font, color, and border style of the column containing the week and month selection links and set styles for days. For details, see Formatting Web Calendar Elements Using Styles.