Table of Contents
Using MonthPicker

Overview

EO.Wpf MonthPicker extends the functionality of the YearPicker control so that you can use a single control to pick both year and month. A MonthPicker displays a link button both for the month and the year, as demonstrated in the following screenshots.

When month drop down is open:

When year drop down is open:

Customzing MonthPicker

The year portion of the MonthPicker can be customized through YearPickerStyle. See here for more information about customizing the year picker. The following diagram demonstrates other customization properties provided by the MonthPicker:

MonthLinkButtonFormat and MonthButtonFormat can be used to customize the text of the month link button and month button inside the drop down respectively. For example, the default value for MonthLinkButtonFormat is "MMM", which format the month link button to display the abbreviated name of the month, while the default MonthButtonFormat is "MMMM", which format the month button inside the drop down to display the full name of the month.

SeparatorTemplate can be used to customize the separator portion of the month picker. The default separator is a TextBlock with two space characters. You can change this to introduce other type of separators. For example, the following code changes the Separator to " - ":

XAML
<eo:MonthPicker>
    <eo:MonthPicker.SeparatorTemplate>
        <DataTemplate>
            <TextBlock Text=" - " />
        </DataTemplate>
    </eo:MonthPicker.SeparatorTemplate>
</eo:MonthPicker>

The above code produces the following result:

Getting MonthPicker Value

The MonthPicker provides SelectedDate and SelectedYear for you to get/set the selected year and month as a DateTime value or just the year value as an integer alone.