Make DateTimePicker work as TimePicker only in WinForms

前端 未结 6 1730
南笙
南笙 2020-12-08 06:01

How to restrict DateTimePicker to select the time only? I don\'t know how to disable calendar control which drops when you press the button at the right of

6条回答
  •  被撕碎了的回忆
    2020-12-08 06:34

    If you want to do it from properties, you can do this by setting the Format property of DateTimePicker to DateTimePickerFormat.Time and ShowUpDown property to true. Also, customFormat can be set in properties.

提交回复
热议问题