DateTimePicker

Wisej.Web.DateTimePicker

Namespace: Wisej.Web

Assembly: Wisej.Framework (2.5.0.0)

Represents a control that allows the user to select or type a date and a time.

public class DateTimePicker : Control, INotifyPropertyChanged

There are 4 tooltip labels that can be localized for this control. They are already localized in the default languages provided by Wisej. An application can localize the tooltip labels by adding the string resources to the localized Resources.resx or /Properties/Resources.resx.

  • $Next year The tooltip text displayed on the popup calendar for the next-year button.

  • $Last year The tooltip text displayed on the popup calendar for the last-year button.

  • $Next month The tooltip text displayed on the popup calendar for the next-month button.

  • $Last month The tooltip text displayed on the popup calendar for the last-month button.

Constructors

DateTimePicker()

Initializes a new instance of the DateTimePicker class.

Properties

AutoSize

Boolean: Returns or sets whether the height of the control is set automatically.

BorderStyle

BorderStyle: Returns or sets the type of border that is drawn around the DateTimePicker.

Checked

Boolean: Returns or sets whether the checkbox in the DateTimePicker is checked and the user can change the control's value. It works in conjunction with the ShowCheckBox property.

CustomFormat

String: Returns or sets the custom date/time format string.

See Custom Date and Time Format Strings for the supported format definitions.

Editable

Boolean: Returns or sets whether the user can edit the text in the control.

EnableNativeContextMenu

Boolean: Enables or disables the browser's context menu.

FirstDayOfWeek

Day: Returns or sets the first day of the week as displayed in the month calendar.

Format

DateTimePickerFormat: Returns or sets the format of the date/time value displayed in the control.

HidePromptOnLeave

Boolean: Returns or sets whether the prompt characters in the input mask are hidden when the masked datetime picker loses focus.

Invalid

Boolean: Returns or sets a value that indicates that the control is invalid.

InvalidMessage

String: Returns or sets the invalid message that is shown in the invalid tooltip.

Label

LabelWrapper: Provides a label related to the control.

LabelText

String: Returns or sets the localizable label associated with this control.

Mask

String: Returns or sets the input mask.

MaxDate

DateTime: Returns or sets the maximum date and time that can be selected in the control.

Throws:

MinDate

DateTime: Returns or sets the minimum date and time that can be selected in the control.

Throws:

NullableValue

Nullable<DateTime>: Returns or sets the date/time Value assigned to the control with the difference that if the value is DateTime.MinValue it returns null.

This property should be used when the DateTimePicker may hold a null date and it's bound to a database nullable column. Throws:

PromptChar

Char: Returns or sets the character used to represent the absence of user input in the DateTimePicker control.

Throws:

  • ArgumentException The character specified when setting this property is not a valid prompt character.

ReadOnly

Boolean: Returns or sets whether the control is read-only.

SelectOnEnter

Boolean: Selects the text when gaining the focus.

ShowCalendar

Boolean: Returns or sets a value indicating if a calendar button (drop down control) is displayed and can be used to pick the date/time value.

ShowCheckBox

Boolean: Returns or sets whether a check box is displayed to the left of the selected date.

ShowToolTips

Boolean: Returns or sets whether the popup calendar shows ToolTips.

ShowUpDown

Boolean: Returns or sets a value indicating if the spin buttons (up and down controls) are displayed and can be used to adjust the date/time value.

ShowWeekNumbers

Boolean: Returns or sets whether the calendar control displays week numbers (1-52) to the left of each row of days.

Text

String: Returns or sets the text associated with this control.

Tools

ComponentToolCollection: Returns the instance of ComponentToolCollection associated with this control.

Value

DateTime: Returns or sets the DateTime value assigned to the control.

Throws:

Watermark

String: Returns or sets the text to show when the field is empty.

Events

CheckedChanged

EventHandler Fired when the value of the Checked property changes.

CloseUp

EventHandler Fired when the drop-down calendar is dismissed and disappears.

EventHandler Fired when the drop-down calendar is shown.

EditableChanged

EventHandler Fired when the value of the Editable property has changed.

FormatChanged

EventHandler Fired when the Format property value has changed.

MaskChanged

EventHandler Occurs after the input mask is changed.

ReadOnlyChanged

EventHandler Fired when the value of the ReadOnly property has changed.

ToolClick

ToolClickEventHandler Fired when a ComponentTool is clicked.

ValueChanged

EventHandler Fired when the Value property changes.

Inherited By

NameDescription

Represents a DateTimePicker control that can be hosted in a DataGridViewDateTimePickerCell.

Implements

NameDescription

Bindable components implement this interface.

All wisej components implement this interface.

All wisej controls derived from the Control class must implement this interface.

Allows an object to serialize itself.

Last updated