-api-id | -api-type |
---|---|
P:Windows.UI.Xaml.Controls.DatePicker.MonthVisible |
winrt property |
Gets or sets a value that indicates whether the month selector is shown.
<DatePicker MonthVisible="bool"/>
true if the month selector is shown; otherwise, false. The default is true.
By default, the DatePicker shows ComboBox elements to select the month, day, and year. Set MonthVisible
to false to hide the ComboBox that displays or changes the month component of a date.
Here's the picker with the month field hidden.

It's typically not useful to show the day field without the month for context. A more common usage is to hide both the day and month, and show only the year, like this.
<DatePicker x:Name="yearDatePicker" Header="In what year was Microsoft founded?"
MonthVisible="False" DayVisible="False"/>