Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Collapse]Scheduler
   [Expand]Product Information
   [Expand]Getting Started
   [Expand]Fundamentals
   [Collapse]Visual Elements
    [Expand]Scheduler Control
    [Expand]Scheduler Command UI
    [Expand]Dialogs
     RangeControl
     Resources Tree
     Date Navigator
     Auxiliary Controls
     Reporting Controls
   [Expand]Design-Time Features
   [Expand]Examples
   [Expand]End-User Capabilities
   [Expand]Member Tables
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Date Navigator

The DateNavigator control allows the end-user to select a date or several date ranges to show them in the bound Scheduler control.

The document includes the following sections:

Expanded Overview

The following image illustrates the visual elements of the DateNavigator control:

The DateNavigator control can function as a standalone control or in bound mode. It automatically binds itself to the Scheduler control if both controls are on the form. When bound to the Scheduler control, the DateNavigator behaves differently, since it synchronizes the range and selected dates with the other control, and may change the font style for the dates with appointments and holidays.

The DateNavigator class enables you to access the control's features in code.

Expanded Date Ranges

The control can display dates in the range specified by its CalendarControlBase.MinValue and CalendarControlBase.MaxValue. Dates outside that range are hidden.

Today's date for the DateNavigator is the system date by default. However, it can be specified arbitrarily using the CalendarControlBase.TodayDate property.

Tip

You can implement custom actions when the end-user clicks the Today button by handling the CalendarControl.TodayClick event.

Expanded Scheduler Control Interaction

When dropped onto a form with a SchedulerControl, the DateNavigator binds itself to the scheduler by setting the DateNavigator.SchedulerControl property. You can bind it to another scheduler by changing this property.

Certain dates are highlighted because they either contain appointments or they are specified as holidays. The rules for highlighting dates are specified by the DateNavigator.BoldAppointmentDates property (which displays the dates with appointments with bold font), and the DateNavigator.HighlightHolidays property (which changes the font color to Red for holidays). Holidays contained in the HolidayBaseCollection can be added to the Scheduler from the SchedulerControl.WorkDays property.

Expanded Display

The following table lists properties, methods and events which affect the display of dates.

Expanded Selection

Click the number to select a date in the DateNavigator. By holding CTRL you can select several non-consecutive days. Click and drag to extend the selection. When you click and drag to select more than a week, the selection is automatically extended to fill entire weeks by default. To change this behavior, use the DateNavigator.SelectionBehavior property.

When the DateNavigator control is bound to SchedulerControl , 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 selected successive days do not comprise a full week, they are displayed using the Day View. If the entire week is selected, the scheduler control displays it using the Full Week View. Selecting consecutive days that form more than a week results in scheduler control being switched to the Month View. This behavior is by default. To avoid switching the view you can disable the unneeded views in the scheduler (SchedulerViewBase.Enabled), or handle the SchedulerControl.DateNavigatorQueryActiveViewType event to specify the type of the view or cancel switching.

Selected ranges are available using the CalendarControlBase.SelectedRanges property.

The user can be required to select a single date by setting the DateNavigator.SelectionMode property to CalendarSelectionMode.Single.

Expanded Appearance

The visual appearance of the DateNavigator can be customized via the corresponding appearance objects for the header and calendar area. The control supports standard Appearance and Look And Feel mechanisms.

The following table contains the properties which affect the appearance of DateNavigator's visual elements.

Visual Element

Property

The number of displayed months and their layout CalendarControlBase.ColumnCount, CalendarControlBase.RowCount, CalendarControlBase.AutoSize
The distance between adjacent months CalendarControlBase.CalendarVerticalIndent, CalendarControlBase.CalendarHorizontalIndent
Cell dimensions and padding CalendarControlBase.CellSize, CalendarControlBase.CellPadding
Gridlines between cells CalendarControlBase.DrawCellLines
Navigation buttons (months and years) and their captions CalendarControlBase.ShowMonthNavigationButtons, CalendarControlBase.ShowYearNavigationButtons, CalendarControlBase.ShowHeader
Month captions CalendarControlBase.ShowMonthHeaders, CalendarControlBase.CaseMonthNames
Today button DateNavigator.ShowTodayButton, CalendarControlBase.ShowFooter, DateNavigator.CalendarAppearance.Button, DateNavigator.CalendarAppearance.ButtonHighlighted, DateNavigator.CalendarAppearance.ButtonPressed
Clear button DateNavigator.ShowClearButton, CalendarControlBase.ShowFooter, DateNavigator.CalendarAppearance.Button, DateNavigator.CalendarAppearance.ButtonHighlighted, DateNavigator.CalendarAppearance.ButtonPressed
Week numbers DateNavigator.ShowWeekNumbers, CalendarControlBase.WeekNumberRule
Week day abbreviations CalendarControlBase.WeekDayAbbreviationLength, CalendarControlBase.CaseWeekDayAbbreviations
Inactive days (the dates which do not belong to a current month but are displayed to fill in the first or last row) DateNavigator.InactiveDaysVisibility

Expanded See Also

How would you rate this topic?​​​​​​​