When end-users select the C1DateEdit control, then press the Enter or Tab to move to another control or select another control with the mouse, the current date is automatically entered into the C1DateEdit control.
To move to another control without the date being automatically entered, complete one of the following:
If you ran the program at this point and selected the C1DateEdit control with either the keyboard or mouse, then try to select the C1TextBox control, today’s date would automatically be entered into the C1DateEditr field and you would be unable to leave that field blank.
Notice that the cursor is in the C1TextBox but the current date remains in the C1DateEdit field.
Notice that even after switching to the C1TextBox, the C1DateEdit field remains empty.
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Imports C1.Win.C1Input |
To write code in C#
C# |
Copy Code
|
---|---|
using C1.Win.C1Input; |
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Dim X As New C1DateEdit Controls.Add(X) X.Location = New Point(50, 40) Dim Y As New C1TextBox Controls.Add(Y) Y.Location = New Point(100, 80) |
To write code in C#
C# |
Copy Code
|
---|---|
C1DateEdit X = new C1DateEdit(); Controls.Add(X); X.Location = new Point(50, 40); C1TextBox Y = new C1TextBox(); Controls.Add(Y); Y.Location = new Point(100, 80); |
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
X.NullText = "{Empty Value}" |
To write code in C#
C# |
Copy Code
|
---|---|
X.NullText = "{Empty Value}"; |
If you ran the program at this point and selected the C1DateEdit control with either the keyboard or mouse, then try to select the C1TextBox control, today’s date would automatically be entered into the C1DateEdit field and you would be unable to leave that field blank.
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
X.DateTimeInput = False X.EmptyAsNull = False |
To write code in C#
C# |
Copy Code
|
---|---|
X.DateTimeInput = False; X.EmptyAsNull = False; |
Notice that even after switching to the C1TextBox, the C1DateEdit field remains empty.