3

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.

1

2 Answers 2

4

Using Calendar instead of DateTimePicker

Sign up to request clarification or add additional context in comments.

Comments

4

Thanks for the tip of use MonthCalendar instead of DateTimePicker, it works for me. To be a little clearer to further readers:

  1. replace DateTimePicker with MonthCalendar
  2. set the property monthCalendar.MaxSelectionCount to 1
  3. use monthCalendar.SelectionRange.Start instead of dtp.Value to get the selected date

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.