HeaderPane
Main
Hide
Share Link
Print

RangeStart Property, SftCalendar Object

Defines the first date of the selected range; Null when there is none.

Syntax

Get

C#object Date = object.RangeStart;
VB.NETDate = object.RangeStart As Object
C++_variant_t Date = object->RangeStart;
_variant_t Date = object->GetRangeStart();
CHRESULT object->get_RangeStart(VARIANT* Date);

Put

C#object object.RangeStart = Date;
VB.NETobject.RangeStart = Date As Object
C++_variant_t object->RangeStart = Date;
void object->PutRangeStart(const _variant_t& Date);
CHRESULT object->put_RangeStart(VARIANT Date);

object

A SftCalendar object.

Date

Defines the first date of the selected range; Null when there is none.

Comments

The RangeStart property defines the first day of the selected range in range selection mode (SelectionMode set to selectionSftDateRange). It is the same as the Value property and is Null if no range is selected. The property can only be set in range selection mode; otherwise it causes an error. p The user selects a range by dragging over the days, with Shift and a click or the arrow keys, or by clicking a week number. The SetRange method sets both dates at once.

Examples

C# View entire sample code

            else if (culture.Calendar == SftDateCalendarTypeConstants.calendarSftDateHebrew)
                info.DateTimeFormat.Calendar = new HebrewCalendar();
            return date.ToString("D", info);
        }

        private void ShowSelection() {
            string text = "Selected: (none)";
            if (sftCalendar.SelectionMode == SftDateSelectionModeConstants.selectionSftDateRange) {
                if (sftCalendar.RangeStart is DateTime) {
                    DateTime start = (DateTime)sftCalendar.RangeStart;
                    DateTime end = sftCalendar.RangeEnd is DateTime ? (DateTime)sftCalendar.RangeEnd : start;
                    text = "Selected: " + FormatLongDate(start) + " - " + FormatLongDate(end);
                }
            } else if (sftCalendar.Value is DateTime)
                text = "Selected: " + FormatLongDate((DateTime)sftCalendar.Value);
            labelSelection.Text = text;

VB.NET View entire sample code

            info.DateTimeFormat.Calendar = New HebrewCalendar()
        End If
        Return value.ToString("D", info)
    End Function

    Private Sub ShowSelection()
        Dim selection As String = "Selected: (none)"
        If sftCalendar.SelectionMode = SftDateSelectionModeConstants.selectionSftDateRange Then
            If TypeOf sftCalendar.RangeStart Is Date Then
                Dim start As Date = CDate(sftCalendar.RangeStart)
                Dim [end] As Date = If(TypeOf sftCalendar.RangeEnd Is Date, CDate(sftCalendar.RangeEnd), start)
                selection = "Selected: " & FormatLongDate(start) & " - " & FormatLongDate([end])
            End If
        ElseIf TypeOf sftCalendar.Value Is Date Then
            selection = "Selected: " & FormatLongDate(CDate(sftCalendar.Value))
        End If

See Also SftCalendar Object | Object Hierarchy | Ranges


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