HeaderPane
Main
Hide
Share Link
Print

ShowTodayButton Property, SftDateCalendar Object

Defines whether the Today button is shown.

Syntax

Get

C#bool Boolean = object.ShowTodayButton;
VB.NETBoolean = object.ShowTodayButton As Boolean
C++VARIANT_BOOL Boolean = object->ShowTodayButton;
VARIANT_BOOL Boolean = object->GetShowTodayButton();
CHRESULT object->get_ShowTodayButton(VARIANT_BOOL* Boolean);

Put

C#bool object.ShowTodayButton = Boolean;
VB.NETobject.ShowTodayButton = Boolean As Boolean
C++VARIANT_BOOL object->ShowTodayButton = Boolean;
void object->PutShowTodayButton(VARIANT_BOOL Boolean);
CHRESULT object->put_ShowTodayButton(VARIANT_BOOL Boolean);

object

A SftDateCalendar object.

Boolean

Defines whether the Today button is shown.

Comments

The ShowTodayButton property defines whether the Today button is shown below the months. The default is True. p Clicking the Today button selects today's date (TodayDate), unless it is disabled, and shows its month. A month calendar control then raises the TodayClicked event; the dropdown calendar of a date field control closes and takes the date (in single selection mode). The button's text is defined using TodayText. p The setting applies to a month calendar control and to the dropdown calendar of a date field control.

Examples

C# View entire sample code

            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;
            checkAutoAdvance.Checked = fieldDate.AutoAdvance;
            checkThemes.Checked = sftCalendar.UseThemes;

            initialized = true;

VB.NET View entire sample code

        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
        checkAutoAdvance.Checked = fieldDate.AutoAdvance
        checkThemes.Checked = sftCalendar.UseThemes

        initialized = True

C++ View entire sample code

    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);
    CheckDlgButton(IDC_THEMES, m_Calendar->UseThemes != VARIANT_FALSE ? BST_CHECKED : BST_UNCHECKED);

    ShowSelection();

See Also SftDateCalendar Object | Object Hierarchy | Today and Clear Buttons


Last Updated 11/29/2026 - (email)
© 2026 Softel vdm, Inc.