---
title: "Calendar Control in ASP.Net"  
description: "Ideally Calendar control is used to display calendar for a month and allows navigating backward & forward through days, and months. This control is hi"  
author: "Pushpendra Singh"  
published: 2010-10-20  
updated: 2019-09-14  
canonical: https://www.mindstick.com/articles/174/calendar-control-in-asp-dot-net  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 2 minutes  

---

# Calendar Control in ASP.Net

Ideally [Calendar control](https://www.mindstick.com/articles/308/monthcalendar-control-in-vb-dot-net) is used to display calendar for a month and allows navigating backward & [forward](https://www.mindstick.com/forum/159810/what-happens-during-a-roll-forward-process) through days, and months. This control is highly customizable in [terms](https://answers.mindstick.com/qa/31698/what-is-the-real-value-of-us-dollars-in-terms-of-indian-rupee) of [functionality](https://www.mindstick.com/blog/136/using-watermark-functionality-in-textbox-by-jquery) and appearance.\

```
<asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
```

![Calendar Control in ASP.Net](https://www.mindstick.com/mindstickarticle/d288f605-ac9e-4cf4-b698-d7762e674ae3/images/6a233b53-ea09-4190-9802-fac082213564.png)

The Calendar control is used to display a one-month calendar that allows the user to select dates and move to the next and previous months.

**Date Selection Modes**

By setting the Selection Mode property, you can specify whether the user can select a single day, a week, or a month, or you can disable date selection entirely.

**Calendar** supports four date selection modes, as described in the following table.

| ## Mode | ## Description |
| --- | --- |
| ## Day | User can select any single day. |
| ## Day Week | User can select a single day, or an entire week. |
| ## Day Week Month | User can select a single day, an entire week, or the entire visible month. |
| ## None | Date selection is disabled. |

![Calendar Control in ASP.Net](https://www.mindstick.com/mindstickarticle/d288f605-ac9e-4cf4-b698-d7762e674ae3/images/f34a20eb-a887-46fe-baef-10c77380d7b3.png)

**[Calendar event](https://www.mindstick.com/forum/411/how-to-create-calendar-event-in-sharepoint-2010-listdefinition-in-xml)**

It has [selection](https://www.mindstick.com/blog/60/populate-records-in-second-listbox-according-to-the-selection-in-first-list-box) changed event. We can show selected date in [Label](https://www.mindstick.com/articles/12835/print-label-tracking-how-do-these-features-make-auspost-woocommerce-plugin-better)

```
<asp:Calendar ID="Calendar1" runat="server"          onselectionchanged="Calendar1_SelectionChanged"></asp:Calendar>    <asp:Label ID="Label1" runat="server"></asp:Label>  protected void Calendar1_SelectionChanged(object sender,  EventArgs e)    {         Label1.Text = Calendar1.SelectedDate.ToString();    }
```

![Calendar Control in ASP.Net](https://www.mindstick.com/mindstickarticle/d288f605-ac9e-4cf4-b698-d7762e674ae3/images/abefaa32-d7f5-4e24-bcdd-da5b157ca266.png)

When you select the date then SelectionChanged event will fire and it will show the selected date and time in the Label.

## Change Calendar Appearance

```
<asp:Calendar ID="Calendar1" runat="server" Font-Bold="True" Font-Italic="True" Font-Names="Arial Black" ForeColor="#FF6600" ></asp:Calendar>
```

![Calendar Control in ASP.Net](https://www.mindstick.com/mindstickarticle/d288f605-ac9e-4cf4-b698-d7762e674ae3/images/00ddaedf-7d2a-489a-a4dd-425444188492.png)

![Calendar Control in ASP.Net](https://www.mindstick.com/mindstickarticle/d288f605-ac9e-4cf4-b698-d7762e674ae3/images/2a7e99cb-65a1-4b50-b97c-cad7c4cdd66f.png)

---

Original Source: https://www.mindstick.com/articles/174/calendar-control-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
