--- title: "Calendar" ms.date: "03/30/2017" helpviewer_keywords: - "controls [WPF], Calendar" - "Calendar control [WPF]" ms.assetid: ee844e4a-eefe-48e2-bd0d-1d82cc5e960b --- # Calendar A calendar enables a user to select a date by using a visual calendar display. A control can be used on its own, or as a drop-down part of a control. For more information, see . The following illustration shows two controls, one with selections and blackout dates and one without. ![Calendar controls](./media/ndp-calendarcontrols.png "NDP_CalendarControls") Calendar controls The following table provides information about tasks that are typically associated with the . |Task|Implementation| |----------|--------------------| |Specify dates that cannot be selected.|Use the property.| |Have the display a month, an entire year, or a decade.|Set the property to Month, Year, or Decade.| |Specify whether the user can select a date, a range of dates, or multiple ranges of dates.|Use the .| |Specify the range of dates that the displays.|Use the and properties.| |Specify whether the current date is highlighted.|Use the property. By default, is `true`.| |Change the size of the .|Use a or set the property to a . Note that if you set the and properties of a , the actual calendar does not change its size.| The control provides basic navigation using either the mouse or keyboard. The following table summarizes keyboard navigation. |Key Combination||Action| |---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|------------| |ARROW||Changes the property if the property is not set to .| |ARROW||Changes the month of the property. Note that the does not change.| |ARROW||Changes the year of the . Note that the does not change.| |SHIFT+ARROW||If is not set to or , extends the range of selected dates.| |HOME||Changes the to the first day of the current month.| |HOME||Changes the month of the to the first month of the year. The does not change.| |HOME||Changes the year of the to the first year of the decade. The does not change.| |END||Changes the to the last day of the current month.| |END||Changes the month of the to the last month of the year. The does not change.| |END||Changes the year of the to the last year of the decade. The does not change.| |CTRL+UP ARROW|Any|Switches to the next larger . If is already , no action.| |CTRL+DOWN ARROW|Any|Switches to the next smaller . If is already , no action.| |SPACEBAR or ENTER| or |Switches to the or represented by focused item.| ## See also - [Controls](index.md) - [Styling and Templating](styles-templates-overview.md)