ComponentOne True DBInput Pro 8.0
GetDatesInView Method (TDBCalendar)

Retrieves the starting and ending date of the calendar currently being displayed in the control. The GetDatesInView method provides information for the months that are being displayed in the control. When the retrieved start and end date it can be used together with the TDBHolidayX object.

Syntax

object.GetDatesInViewStartDate, EndDate, [Type]

Arguments

startdate is a required variable that retrieves the first normal or the trailing day or the MinDate in the current view as VB Date type.

enddate is a required variable that retrieves the last normal or the trailing day or the MaxDate in the current view as VB Date type.

type is an optional constant that determines retrieving the first/last normal day, the trailing day, or the MaxDate/MinDate if present in the current view. If not specified, 0-Normal day will be set as default.

Valid settings for the type parameter are as follows:

0

Normal day (Default)

1

Trailing day

2

Minimum or maximum day

Return Value

None

Remarks

The return values of the GetDatesInView method can vary depending on the StartOfWeek property which determines the first weekday displayed in the calendar.

If the MinDate property is set to 100/01/01, the GetDatesInView method will return 100/01/01 for all of the options specified with the type parameter when January of year 100 is displayed in the upper left position. However if the MinDate property is set to a value such as 100/02/15, displaying February of year 100 will return 100/1/31 for the trailing day, 100/2/1 for the normal day and the 100/2/15 for the minimum date. Note that the StartOfWeek property is set to 1-Sunday in this case. If the MinDate or the MaxDate property is set to the smallest or the largest date displayed in the current view, both the 1-normal day and the 2-MinMax options will return the same values.

The 1-Trailing option specified with the type parameter will not be influence whether the trailing days are displayed or not (determine using ShowTrailing property).

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback