Table of Contents

Interface ICalendar

Namespace
HP.LFT.SDK.WPF
Assembly
HP.LFT.SDK.dll

A .NET WPF calendar or a date picker object.

public interface ICalendar : IUiObjectBase, IUiObjectBase, IClickable, IDoubleClickable, ILocationInfoProvider, ISupportSendKeys, ISupportDragAndDrop, IEnabledProvider, IVisibleProvider, ISupportsNativeObject, ITestObject, ITestObjectDescriber
Inherited Members
Extension Methods

Properties

Date

Either the date or the start date of the date range associated with this object. Note:

DateTime Date { get; }

Property Value

DateTime

Remarks

  • In case a date range is selected, the Date property will return the start date of the range.

- If you try to retrieve a date value from a WPF calendar object (e.g. calendar.Date; calendar.Date.Month; calendar.Date.Year) before performing an operation on it, an exception of type: InvalidOperationException is returned. Therefore, make sure to precede the retrieve value step with a step that performs an operation on the calendar, such as using SetDate(DateTime) to set the date on the calendar to the current date.

DateRanges

The selected date range of this Month Calendar control in multi-selection mode.

DateRange[] DateRanges { get; }

Property Value

DateRange[]

Remarks

If a single date is selected in the calendar:

  • DateRanges returns an array with a single element.
  • Both DateRange.StartDate and DateRange.EndDate are equal to the selected date.

HelpText

The help text associated with this object.

string HelpText { get; }

Property Value

string

ParentText

The text associated with the parent object of this object.

string ParentText { get; }

Property Value

string

Methods

GetDateFormatType()

Returns the date format type.

DateFormatType GetDateFormatType()

Returns

DateFormatType

SetDate(DateTime)

Sets the date of a WPF calendar or of a date picker.

void SetDate(DateTime date)

Parameters

date DateTime

The date to set.

SetDateRange(DateRange)

Sets the date range of a WPF calendar or the date of a date picker.

void SetDateRange(DateRange dateRange)

Parameters

dateRange DateRange

The date range to set.

SetDateRange(DateTime, DateTime)

Sets the date range of a WPF calendar or the date of a date picker.

void SetDateRange(DateTime startDate, DateTime endDate)

Parameters

startDate DateTime

The start date of the range.

endDate DateTime

The end date of the range.

SetDateRanges(params DateRange[])

Sets the date ranges of a WPF calendar or the date of a date picker.

void SetDateRanges(params DateRange[] dateRanges)

Parameters

dateRanges DateRange[]

The date ranges to set.

SetMonth(int)

Sets the month in a WPF calendar.

void SetMonth(int month)

Parameters

month int

A number from 1 to 12.

SetYear(int)

Sets the year in a WPF calendar.

void SetYear(int year)

Parameters

year int

The year to be set for the calendar.