Defines the first day of the week.
Get
| C# | SftDateFirstDayConstants Day = object.FirstDayOfWeek; |
| VB.NET | Day = object.FirstDayOfWeek As SftDateFirstDayConstants |
| C++ | enum SftDateFirstDayConstants Day = object->FirstDayOfWeek; enum SftDateFirstDayConstants Day = object->GetFirstDayOfWeek(); |
| C | HRESULT object->get_FirstDayOfWeek(enum SftDateFirstDayConstants* Day); |
Put
| C# | SftDateFirstDayConstants object.FirstDayOfWeek = Day; |
| VB.NET | object.FirstDayOfWeek = Day As SftDateFirstDayConstants |
| C++ | enum SftDateFirstDayConstants object->FirstDayOfWeek = Day; void object->PutFirstDayOfWeek(enum SftDateFirstDayConstants Day); |
| C | HRESULT object->put_FirstDayOfWeek(enum SftDateFirstDayConstants Day); |
object
Day
Defines the first day of the week.
| Name | Value | Description |
|---|---|---|
| firstDaySftDateDefault | 0 | The culture's first day |
| firstDaySftDateSunday | 1 | Sunday |
| firstDaySftDateMonday | 2 | Monday |
| firstDaySftDateTuesday | 3 | Tuesday |
| firstDaySftDateWednesday | 4 | Wednesday |
| firstDaySftDateThursday | 5 | Thursday |
| firstDaySftDateFriday | 6 | Friday |
| firstDaySftDateSaturday | 7 | Saturday |
The FirstDayOfWeek property defines the day of the week shown in the first column of each month. The default is firstDaySftDateDefault, the first day of the week of the culture (Culture). p Week numbers (ShowWeekNumbers) using the culture's rule follow the first day of the week; ISO 8601 week numbers always start on Monday (WeekNumberRule). p The setting applies to a month calendar control and to the dropdown calendar of a date field control.
comboAlignment.SelectedIndex = (int)fieldDate.DropDownAlignment;
comboAcross.Items.AddRange(new object[] { "1", "2", "3" });
comboAcross.SelectedIndex = cal.MonthsAcross - 1;
comboDown.Items.AddRange(new object[] { "1", "2" });
comboDown.SelectedIndex = cal.MonthsDown - 1;
comboWeekNumbers.Items.AddRange(new object[] { "None", "Culture rule", "ISO 8601" });
comboWeekNumbers.SelectedIndex = !cal.ShowWeekNumbers ? 0 : cal.WeekNumberRule == SftDateWeekRuleConstants.weekRuleSftDateISO8601 ? 2 : 1;
comboFirstDay.Items.AddRange(new object[] { "(Culture)", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" });
comboFirstDay.SelectedIndex = (int)cal.FirstDayOfWeek;
comboViews.Items.AddRange(new object[] { "All", "Month and year", "Month only" });
comboViews.SelectedIndex = Math.Max(0, Array.IndexOf(viewSets, cal.AllowedViews));
checkTrailing.Checked = cal.ShowTrailingDates;
checkTodayButton.Checked = cal.ShowTodayButton;
checkHighlightToday.Checked = cal.HighlightToday;
checkClearButton.Checked = cal.ShowClearButton;
checkDropOnFocus.Checked = fieldDate.DropOnFocus;
comboAlignment.SelectedIndex = CInt(fieldDate.DropDownAlignment)
comboAcross.Items.AddRange(New Object() {"1", "2", "3"})
comboAcross.SelectedIndex = cal.MonthsAcross - 1
comboDown.Items.AddRange(New Object() {"1", "2"})
comboDown.SelectedIndex = cal.MonthsDown - 1
comboWeekNumbers.Items.AddRange(New Object() {"None", "Culture rule", "ISO 8601"})
comboWeekNumbers.SelectedIndex = If(Not cal.ShowWeekNumbers, 0, If(cal.WeekNumberRule = SftDateWeekRuleConstants.weekRuleSftDateISO8601, 2, 1))
comboFirstDay.Items.AddRange(New Object() {"(Culture)", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"})
comboFirstDay.SelectedIndex = CInt(cal.FirstDayOfWeek)
comboViews.Items.AddRange(New Object() {"All", "Month and year", "Month only"})
comboViews.SelectedIndex = Math.Max(0, Array.IndexOf(viewSets, cal.AllowedViews))
checkTrailing.Checked = cal.ShowTrailingDates
checkTodayButton.Checked = cal.ShowTodayButton
checkHighlightToday.Checked = cal.HighlightToday
checkClearButton.Checked = cal.ShowClearButton
checkDropOnFocus.Checked = fieldDate.DropOnFocus
FillCombo((CComboBox*) GetDlgItem(IDC_HIGHCONTRAST), g_modes, 3, m_Calendar->HighContrastMode);
FillCombo((CComboBox*) GetDlgItem(IDC_BUTTONS), g_buttons, 4, m_Fields[0]->Buttons);
FillCombo((CComboBox*) GetDlgItem(IDC_BORDER), g_borders, 3, IndexOf(g_borderStyles, 3, m_Fields[0]->BorderStyle));
FillCombo((CComboBox*) GetDlgItem(IDC_ALIGNMENT), g_alignments, 2, m_Fields[0]->DropDownAlignment);
FillCombo((CComboBox*) GetDlgItem(IDC_ACROSS), g_across, 3, cal->MonthsAcross - 1);
FillCombo((CComboBox*) GetDlgItem(IDC_DOWN), g_down, 2, cal->MonthsDown - 1);
FillCombo((CComboBox*) GetDlgItem(IDC_WEEKNUMBERS), g_weekNumbers, 3,
cal->ShowWeekNumbers == VARIANT_FALSE ? 0 : cal->WeekNumberRule == weekRuleSftDateISO8601 ? 2 : 1);
FillCombo((CComboBox*) GetDlgItem(IDC_FIRSTDAY), g_firstDays, 8, cal->FirstDayOfWeek);
FillCombo((CComboBox*) GetDlgItem(IDC_VIEWS), g_views, 3, IndexOf(g_viewSets, 3, cal->AllowedViews));
CheckDlgButton(IDC_TRAILING, cal->ShowTrailingDates != VARIANT_FALSE ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(IDC_TODAYBUTTON, cal->ShowTodayButton != VARIANT_FALSE ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(IDC_HIGHLIGHTTODAY, cal->HighlightToday != VARIANT_FALSE ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(IDC_CLEARBUTTON, cal->ShowClearButton != VARIANT_FALSE ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(IDC_DROPONFOCUS, m_Fields[0]->DropOnFocus != VARIANT_FALSE ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(IDC_AUTOADVANCE, m_Fields[0]->AutoAdvance != VARIANT_FALSE ? BST_CHECKED : BST_UNCHECKED);See Also SftDateCalendar Object | Object Hierarchy | Week Numbers