AD
Administrator
Syncfusion Team
April 29, 2005 04:47 PM UTC
Hi Eric,
Since DataTime is a value type, it can''t be given a null value. Therefore, DateTimePickerAdv represents a null date with the IsNullDate property. So to have a TextBox display Null if the date is null, you need to do something like this:
private void dateTimePickerAdv1_ValueChanged(object sender, System.EventArgs e)
{
if (this.dateTimePickerAdv1.IsNullDate)
{
this.textBox1.Text = "Null";
}
else
{
this.textBox1.Text = this.dateTimePickerAdv1.Value.ToLongDateString();
}
}
Regards,
Gregory Austin
Syncfusion Inc.
P.S. DateTimePickerAdv is a part of the Editor package of Tools, not Edit.