Returns the SftDateCalendar object with the calendar settings.
| C# | SftDateCalendar refCalendarObj = object.Calendar; |
| VB.NET | refCalendarObj = object.Calendar As SftDateCalendar |
| C++ | ISftDateCalendar* refCalendarObj = object->Calendar; ISftDateCalendar* refCalendarObj = object->GetCalendar(); |
| C | HRESULT object->get_Calendar(ISftDateCalendar** refCalendarObj); |
object
refCalendarObj
Returns a reference to the control's SftDateCalendar object.
The Calendar property returns the SftDateCalendar object, which holds the settings of a calendar: the number of months, week numbers, the Today and Clear buttons, views, special dates, fonts and colors. p For a month calendar control (SftCalendar), these are the settings of the control itself. For a date field control (SftDate), they are the settings of its dropdown calendar.
maxDate = sftCalendar.MaxDate;
labelHelp.Text = "Type into the parts of a field, change a part with the Up and Down keys or the mouse wheel, and open the " +
"dropdown with F4 or Alt+Down. In the dropdown of the date and time field, Tab switches between the calendar " +
"and the time. The free-form field parses what you type in the selected culture.\r\n\r\n" +
"The options apply to all fields and calendars; the month counts apply to the SftCalendar control.";
// the options start out with the controls' settings
SftDateCalendar cal = sftCalendar.Calendar;
comboCulture.Items.AddRange(cultures);
comboCulture.SelectedIndex = 0;
comboDarkMode.Items.AddRange(new object[] { "Off", "On", "Auto" });
comboDarkMode.SelectedIndex = (int)sftCalendar.DarkMode;
comboHighContrast.Items.AddRange(new object[] { "Off", "On", "Auto" });
comboHighContrast.SelectedIndex = (int)sftCalendar.HighContrastMode;
comboButtons.Items.AddRange(new object[] { "Dropdown", "Up/down", "Dropdown, up/down", "None" });
maxDate = sftCalendar.MaxDate
labelHelp.Text = "Type into the parts of a field, change a part with the Up and Down keys or the mouse wheel, and open the " &
"dropdown with F4 or Alt+Down. In the dropdown of the date and time field, Tab switches between the calendar " &
"and the time. The free-form field parses what you type in the selected culture." & vbCrLf & vbCrLf &
"The options apply to all fields and calendars; the month counts apply to the SftCalendar control."
' the options start out with the controls' settings
Dim cal As SftDateCalendar = sftCalendar.Calendar
comboCulture.Items.AddRange(cultures)
comboCulture.SelectedIndex = 0
comboDarkMode.Items.AddRange(New Object() {"Off", "On", "Auto"})
comboDarkMode.SelectedIndex = CInt(sftCalendar.DarkMode)
comboHighContrast.Items.AddRange(New Object() {"Off", "On", "Auto"})
comboHighContrast.SelectedIndex = CInt(sftCalendar.HighContrastMode)
comboButtons.Items.AddRange(New Object() {"Dropdown", "Up/down", "Dropdown, up/down", "None"})See Also SftCalendar Object | Object Hierarchy | Calendar Components