Do you know the WPF MonthPicker control?

I'm looking for a MonthPicker control, the control is exactly the same as a DatePicker, but you can only select the month and year.

Before starting to write one of the scripts, I would like to know if something like this exists.

+3
source share
3 answers

Finally made my own. It needs polishing, but it works:

alt text

Usercontrol VB code at https://dl.dropboxusercontent.com/u/16351501/MonthPicker.zip

+1
source

I used System.Windows.Controls.Calendar as follows:

Calendaer used as MonthPicker

(which is in Hebrew, but I would have guessed that you have an idea ...)

XAML:

<Calendar Name="dteSelectedMonth" DisplayMode="Year" SelectionMode="None" 
          DisplayModeChanged="dteSelectedMonth_DisplayModeChanged" />

Year:

    private void dteSelectedMonth_DisplayModeChanged(object sender, CalendarModeChangedEventArgs e)
    {
        dteSelectedMonth.DisplayMode = CalendarMode.Year;
    }

dteSelectedMonth.DisplayDate, .

, Expander ComboBox SelectedMonth

+2

In the WPF Toolkit DatePicker, the calendar can be updated.

You can also override the format of the string in the text box in DatePicker to display only the month and year.

Below are examples and discussion here .

0
source

Source: https://habr.com/ru/post/1763897/


All Articles