Set DateTimePicker value to be null

前端 未结 8 1095
感情败类
感情败类 2020-12-01 16:43

I am developing a WinForms UI with two DateTimePicker controls. Initially I want to set the value of the controls to null until a user selects a date. If the us

8条回答
  •  天命终不由人
    2020-12-01 17:35

    May be you need to create a UserControl withe the Appereance of a TextBox,and when the user click on a Calender Show, when you select a Date set it to the TextBox. It will allow nulls values.

    The DateTimePicker does not allow null.

提交回复
热议问题