Class BaseDatePicker
A base date picker control.
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class BaseDatePicker : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder
Constructors
BaseDatePicker()
Default constructor.
Declaration
public BaseDatePicker()
Fields
dayPickerUssClassName
The days pane USS class name.
Declaration
public static readonly string dayPickerUssClassName
Field Value
| Type | Description |
|---|---|
| string |
displayModeUssClassName
The display mode USS class name.
Declaration
public static readonly string displayModeUssClassName
Field Value
| Type | Description |
|---|---|
| string |
monthsPaneUssClassName
The months pane USS class name.
Declaration
public static readonly string monthsPaneUssClassName
Field Value
| Type | Description |
|---|---|
| string |
ussClassName
Main USS class name of elements of this type.
Declaration
public const string ussClassName = "appui-date-picker"
Field Value
| Type | Description |
|---|---|
| string |
yearPickerUssClassName
The years pane USS class name.
Declaration
public static readonly string yearPickerUssClassName
Field Value
| Type | Description |
|---|---|
| string |
Properties
contentContainer
Child elements are added to it, usually this is the same as the element itself.
Declaration
public override VisualElement contentContainer { get; }
Property Value
| Type | Description |
|---|---|
| VisualElement |
Overrides
currentMonth
The current month displayed in the date picker.
Declaration
public int currentMonth { get; }
Property Value
| Type | Description |
|---|---|
| int |
currentYear
The current year displayed in the date picker.
Declaration
public int currentYear { get; }
Property Value
| Type | Description |
|---|---|
| int |
displayMode
The current display mode of the date picker.
Declaration
public BaseDatePicker.DisplayMode displayMode { get; set; }
Property Value
| Type | Description |
|---|---|
| BaseDatePicker.DisplayMode |
firstDayOfWeek
The first day of the week displayed in the date picker.
Declaration
public DayOfWeek firstDayOfWeek { get; set; }
Property Value
| Type | Description |
|---|---|
| DayOfWeek |
Methods
GoTo(DateTime)
Show the specified date in the date picker.
Declaration
public void GoTo(DateTime date)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | date | The date to show. |
GoTo(Date)
Show the specified date in the date picker.
Declaration
public void GoTo(Date date)
Parameters
| Type | Name | Description |
|---|---|---|
| Date | date | The date to show. |
GoToMonth(int)
Show the specified month in the date picker.
Declaration
public void GoToMonth(int month)
Parameters
| Type | Name | Description |
|---|---|---|
| int | month | The month to show. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | Thrown if the month is not between 1 and 12. |
GoToNextMonth()
Show the next month in the date picker.
Declaration
public void GoToNextMonth()
GoToNextYear()
Show the next year in the date picker.
Declaration
public void GoToNextYear()
GoToPreviousMonth()
Show the previous month in the date picker.
Declaration
public void GoToPreviousMonth()
GoToPreviousYear()
Show the previous year in the date picker.
Declaration
public void GoToPreviousYear()
GoToYear(int)
Show the specified year in the date picker.
Declaration
public void GoToYear(int year)
Parameters
| Type | Name | Description |
|---|---|---|
| int | year | The year to show. |
RefreshUI()
Refresh the overall UI of the date picker.
Declaration
protected void RefreshUI()