Skip to main content

Date Navigator

  • 4 minutes to read

This document introduces the Date Navigator, along with describing its main features and capabilities. The table below lists the control's main members, exposes its main functionality and allows you to find the necessary APIs.

#What Is the Date Navigator?

Date Navigator is a control of the DXEditors Suite for Silverlight. It is represented by the DateNavigator class instance. This control can function in a standalone mode allowing end-users to navigate in a calendar, and choose a day or range of days. It can also be bound to SchedulerControl to allow your end-users to easily navigate through the dates in the Scheduler Control. Date Navigator automatically switches scheduler views when there is a more appropriate view to display the selected date or date range. In short, this control performs the same function as the corresponding control in Microsoft® Outlook®. A scheduling application can be created without using Date Navigator; use this control, however, if you wish to deliver the Microsoft Outlook style to your scheduling application interface.

#How Does the Date Navigator Look?

Date Navigator usually shows dates for one or more months at a time (if the DateNavigator.CalendarView property is set to DateNavigatorCalendarView.Month). In this case, Date Navigator includes a navigation pane (that includes a range of the currently shown months, the year, along with navigation arrows used to move backwards and forwards through months), calendars that correspond to a particular month, and a Today button that can be optionally displayed at the bottom of the DateNavigator control. Each monthly calendar consists of a month header (displaying month and year) and days (within week days and week numbers).

DXDateNavigator

The DateNavigator control can display more than just a month(s). It also allows you to display different date ranges using different calendar views (DateNavigatorCalendarView). End-users can quickly change calendar views by clicking the Date Navigator navigation pane. To specify a calendar view in code, use the DateNavigator.CalendarView property. Note that by default the number of calendars shown at a time in the DateNavigator control is selected automatically according to the control's current size, and changed every time a control is resized. To set a fixed number of calendar rows and columns in the Date Navigator, use the DateNavigator.RowCount and DateNavigator.ColumnCount properties.

When the DateNavigator control is bound to SchedulerControl (DateNavigator.StyleSettings), any selection made in the Date Navigator is synchronized with the scheduler control.

Selecting one day or several non-consecutive days results in a scheduler displaying them using the Day View. If you select less than seven successive days, they are displayed using the Day View as well. If a whole week is selected, the scheduler control displays it using the Week View. Selecting consecutive days that form more than a week results in the scheduler control being switched to the Month View. This behavior is by default; to avoid this, disable unneeded views in the scheduler (SchedulerViewBase.Enabled).

The DateNavigator control indicates days with appointments by displaying them in bold, while holidays are highlighted with red. You can set the DateNavigator.HighlightSpecialDates property value to false to force the control not to paint days with appointments using the bold font.

In a bound mode, the day from which the Date Navigator week starts is specified via the OptionsView.FirstDayOfWeek property. If the DateNavigator control functions in a standalone mode, use the DateNavigator.FirstDayOfWeek property to set the first day of the week in Date Navigator.

#What Are the Main Members of the Date Navigator?

The following table lists the main properties of the DateNavigator class, which implement its basic functionality.

Member Name Description
DateNavigator.StyleSettings Gets or sets an object that defines the DateNavigator control's appearance and behavior.
DateNavigator.ShowWeekNumbers Gets or sets a value indicating whether week numbers will be shown in the Date Navigator.
DateNavigator.ShowTodayButton Gets or sets a value which specifies whether the Today button is visible.
DateNavigator.WeekNumberRule Gets or sets the rule which specifies the first week of the year.
DateNavigator.HighlightHolidays Gets or sets a value indicating if holiday dates should be highlighted in red.
DateNavigator.HighlightSpecialDates Gets or sets a value indicating whether the special dates should be shown bold.
DateNavigator.IsMultiSelect Gets or sets a value indicating if end-users can select several dates at the same time in the DateNavigator control.
DateNavigator.CalendarView Specifies one of the calendar views intended to display date ranges of a different scope in a different manner.

To get a tutorial on how to add the DateNavigator control to your project and bind it to SchedulerControl, refer to the How to: Use a Date Navigator in a Scheduling Application document.

See Also