By default, C1Calendar automatically fills each of its cells (either 35 or 42, depending on whether the month spans over 5 or 6 calendar weeks) with a date. The calendar fills its extra cells with the last dates of the previous month and/or the first dates of the next month. You can remove these extra dates by setting the ShowWeekDays property to False. This topic assumes that you have created an AJAX-enabled ASP.NET project that contains a ScriptManager control (see Creating an AJAX-Enabled ASP.NET Project) and a C1Calendar control.
In Design View
You can remove the other month days in design view using the smart tag or the Properties window.
• Using the Smart Tag:
Complete the following steps:
a. Click the Design tab to enter Design view.
b. Click C1Calendar’s
smart tag () to open the C1Calendar
Tasks menu.
c. Deselect the Show Other Month Days checkbox.
• Using the Properties Window:
Complete the following steps:
a. Click the Design tab to enter Design view.
b. Right-click C1Calendar to open its context menu and then select Properties.
c. The Properties window opens with C1Calendar’s properties in focus.
d. Locate the ShowOtherMonthDays property, click its drop-down arrow, and select False.
In Source View
To remove the other month days, add ShowOtherMonthDays="False" to the <cc1:C1Calendar> tag so that the markup resembles the following:
<cc1:C1Calendar ID="C1Calendar1" runat="server" Height="180px" Width="230px" ShowOtherMonthDays="False">
In Code
Complete the following steps:
1. Import the following namespaces into your project:
Imports C1.Web.iPhone.C1Calendar
•C#
using C1.Web.iPhone.C1Calendar;
2. Add the following code to the Page_Load event to set the ShowOtherMonthDays property to False:
C1Calendar1.ShowOtherMonthDays = False
•C#
C1Calendar1.ShowOtherMonthDays = false;
3. Open the project in a Studio for iPhone-compatible browser.
This topic
illustrates the following:
The following image shows a C1Calendar control with the other month days removed: