I have one DateTimePicker on WindowsForm that should stay open for all life of the form. How I can do that WITHOUT use the command by line to open it everytime CloseUp. I need something like a properties to prevent the closing.
2 Answers
Thanks for the tip of use MonthCalendar instead of DateTimePicker, it works for me. To be a little clearer to further readers:
- replace DateTimePicker with MonthCalendar
- set the property
monthCalendar.MaxSelectionCountto 1 - use
monthCalendar.SelectionRange.Startinstead ofdtp.Valueto get the selected date