Empty datetimepicker
-
I want to dispaly empty datetimepicker, which means don't want to display today date as default in C#.NET windows application. Plz Reply.
Jo
-
-
I want to dispaly empty datetimepicker, which means don't want to display today date as default in C#.NET windows application. Plz Reply.
Jo
In addition to what d@nish said, you must initialize the value to DateTime.MinValue, and in the methods which use this value, make sure it's not DateTime.MinValue - this ensures the user has selected a date. Also, in your
dateTimePicker1_ValueChanged
handler, usedateTimePicker1.Format = DateTimePickerFormat.Long;
or whatever format you want - otherwise the user will see an empty box, no matter what he selects!Cheers, Vikram.
The hands that help are holier than the lips that pray.
-
I want to dispaly empty datetimepicker, which means don't want to display today date as default in C#.NET windows application. Plz Reply.
Jo
Have a look at this: http://www.codeproject.com/KB/selection/Nullable_DateTimePicker.aspx[^] Kjetil