Siticone Month of Year Picker
The SiticoneMonthOfYearPicker is a specialized dropdown control for selecting a specific month within a year.
Unlike a full calendar, it focuses solely on month selection, making it ideal for credit card expiry dates, reporting periods, or annual schedules.
Selection & Date
Manage the month and year data directly.
| Property | Type | Description |
|---|---|---|
SelectedMonth |
int | The currently selected month index (0 for January, 11 for December). |
Year |
int | The year associated with the selection. Defaults to current year. |
MinYear |
int | The minimum year available in the dropdown selector. |
MaxYear |
int | The maximum year available in the dropdown selector. |
AdjustMaxDayForMonth |
bool | If true, automatically adjusts day limits when month changes (e.g. Feb 28/29). |
Visual Style
Customize the appearance of the control and its dropdown menu.
| Property | Type | Description |
|---|---|---|
MonthPickerBackColor |
Color | Background color of the main control area. |
TextColor |
Color | Color of the unselected month text. |
SelectedMonthBackColor |
Color | Background color of the currently selected month item. |
SelectedTextColor |
Color | Text color of the currently selected month item. |
HoverBackColor |
Color | Background color when hovering over a month item. |
BorderColor |
Color | Color of the control border. |
Dropdown Configuration
Control the behavior and layout of the popup list.
| Property | Type | Description |
|---|---|---|
DropdownBackColor |
Color | Background color of the dropdown list. |
DropdownMaxHeight |
int | Maximum height of the dropdown list in pixels. |
VisibleMonthCount |
int | Number of months visible at once before scrolling is required. |
AutoCloseOnSelection |
bool | If true, the dropdown closes immediately after a month is clicked. |
DropdownTopAligned |
bool | If true, the dropdown appears above the control instead of below. |
Events
React to user selections.
// Fired when the selected month changes.
monthPicker.SelectedMonthChanged += (s, e) =>
{
Console.WriteLine($"Month changed from {e.OldMonthName} to {e.NewMonthName}");
Console.WriteLine($"New date: {e.NewMonth + 1}/1/{e.Year}");
};
// Fired when the year is changed via property or interaction.
monthPicker.YearChanged += (s, e) =>
{
Console.WriteLine($"Year changed to {e.NewYear}");
};
Designer Support
The control includes a comprehensive Smart Tag menu in Visual Studio for rapid configuration.
| Category | Features |
|---|---|
Theme Presets |
Apply predefined styles: Light, Dark, Blue, Green, Purple, Sunset Orange. |
Data Management |
Copy style settings from one picker and paste them to another. |
Usage Examples
Example 1: Credit Card Expiry Picker
Setup for selecting a credit card expiration date (Month/Year).
private void SetupExpiryPicker()
{
monthPicker.Year = DateTime.Now.Year;
monthPicker.MinYear = DateTime.Now.Year;
monthPicker.MaxYear = DateTime.Now.Year + 10;
// Customize display
monthPicker.SelectedMonthBackColor = Color.DodgerBlue;
monthPicker.SelectedTextColor = Color.White;
monthPicker.SelectedMonthChanged += (s, e) =>
{
// Format as MM/YY
string expiry = $"{(e.NewMonth + 1):D2}/{e.Year % 100}";
lblExpiry.Text = expiry;
};
}
Example 2: Quarterly Report Selector
Using the picker to select a month for generating reports.
private void SetupReportPicker()
{
monthPicker.SelectedMonth = DateTime.Now.Month - 1; // 0-indexed
// Style for business app
monthPicker.ApplyCorporateBlueTheme();
btnGenerate.Click += (s, e) =>
{
int quarter = (monthPicker.SelectedMonth / 3) + 1;
GenerateQuarterlyReport(quarter, monthPicker.Year);
};
}