Class DateTimePickerAdvanced
Masked date/time entry control that combines a formatted text box with a
drop-down month calendar, validating user input against configurable date and
time format strings and min/max date limits.
Inheritance
DateTimePickerAdvanced
Assembly: Reportman.Drawing.Forms.dll
public class DateTimePickerAdvanced : UserControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl
Constructors
View Source
Declaration
public DateTimePickerAdvanced()
Fields
View Source
Declaration
public BeforeEnterTabEvent BeforeEnterTab
Field Value
View Source
Declaration
protected const string NOSUPPORTDATECHARS = "fFgKz%\\"
Field Value
View Source
Declaration
protected DateDropButton btnCalendar
Field Value
View Source
Declaration
protected TextBox txtDate
Field Value
Properties
View Source
Gets and sets the textbox's background color.
Declaration
public override Color BackColor { get; set; }
Property Value
Overrides
View Source
Declaration
public Font CalendarFont { get; set; }
Property Value
View Source
Gets and sets the textbox's context menu strip.
Declaration
public override ContextMenuStrip ContextMenuStrip { get; set; }
Property Value
Overrides
View Source
Declaration
public string CustomFormat { get; set; }
Property Value
View Source
Gets and sets the displayed date format string.
Declaration
public string DateFormat { get; set; }
Property Value
View Source
Declaration
public DateTimeFormatInfo DateFormatInfo { get; }
Property Value
View Source
DateTimeEntryPattern
Gets the pattern in 0's how the date and time are entered.
Declaration
public string DateTimeEntryPattern { get; }
Property Value
View Source
Gets the displayed combined date and time format string.
Declaration
public string DateTimeFormat { get; }
Property Value
View Source
Declaration
public bool EnterAsTab { get; set; }
Property Value
View Source
Gets and sets the textbox's font.
Declaration
public override Font Font { get; set; }
Property Value
Overrides
View Source
Gets and sets the textbox's foreground color.
Declaration
public override Color ForeColor { get; set; }
Property Value
Overrides
View Source
FormattedText
Gets the displayed text in the textbox as is.
Declaration
public string FormattedText { get; }
Property Value
View Source
Declaration
public bool HandleKeyUpDown { get; set; }
Property Value
View Source
Declaration
public bool HandleLeftRightTabs { get; set; }
Property Value
View Source
Gets and sets the maximum date value allowed.
Declaration
public DateTime MaxDate { get; set; }
Property Value
View Source
Gets and sets the minimum date value allowed.
Declaration
public DateTime MinDate { get; set; }
Property Value
View Source
Gets and sets the textbox's selection length.
Declaration
[Browsable(false)]
public int SelectionLength { get; set; }
Property Value
View Source
Gets and sets the textbox's selection start.
Declaration
[Browsable(false)]
public int SelectionStart { get; set; }
Property Value
View Source
Text
Gets and sets the displayed date and time in the text part of the control. Computer will beep if set value is not a valid date or time.
Declaration
public override string Text { get; set; }
Property Value
Overrides
System.Windows.Forms.UserControl.Text
View Source
Gets and sets the displayed time format string.
Declaration
public string TimeFormat { get; set; }
Property Value
View Source
Gets to check if the value in the date textbox is a valid date.
Declaration
public IsDateValidResult ValidDate { get; }
Property Value
View Source
Get to check if both the date and time formats are valid.
Declaration
public bool ValidFormatStrings { get; }
Property Value
View Source
Gets and sets the DateTime value in the control. Computer will beep if the control has an invalid date.
Declaration
public DateTime Value { get; set; }
Property Value
Methods
View Source
Clean up any resources being used.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type |
Name |
Description |
| bool |
disposing |
true if managed resources should be disposed; otherwise, false.
|
Overrides
View Source
Declaration
protected IsDateValidResult IsDateValid(string szDateText)
Parameters
| Type |
Name |
Description |
| string |
szDateText |
|
Returns
View Source
Declaration
Returns
View Source
Declaration
protected override void OnEnabledChanged(EventArgs e)
Parameters
Overrides
View Source
Declaration
protected override void OnEnter(EventArgs e)
Parameters
Overrides
View Source
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
Overrides
View Source
Declaration
protected override void OnLeave(EventArgs e)
Parameters
Overrides
View Source
Declaration
protected override void OnValidating(CancelEventArgs e)
Parameters
Overrides
View Source
Fires ValueChanged Event when the date and/or time value changes.
Declaration
protected virtual void OnValueChanged(EventArgs eventargs)
Parameters
View Source
Declaration
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
Parameters
Returns
Overrides
View Source
Selects all the text in the textbox.
Declaration
View Source
Declaration
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
Parameters
Overrides
View Source
Declaration
public void ShowValFailMsg(IsDateValidResult eResult)
Parameters
Events
View Source
Fired when the date and/or time value changes.
Declaration
public event EventHandler ValueChanged
Event Type
Implements