winforms - Setting Minimum Date for Date Time Picker for Windows Forms C# -


i'm working on to-do list windows forms application in c# features date time picker, through research able find able set minvalue property of date time picker within designer tab of form.

the plan set minimum date value date time picker through following code:

    this.startdatepicker.mindate = system.datetime.now;     this.startdatepicker.value = system.datetime.now; 

this isn't issue, code fine , works. sets minimum value date time picker today, preventing user choosing date before date.

however, issue reason designer tab decides reset , automatically remove code.

i wondering if there way prevent designer tab changing minimum value date time picker?

are modifying .designer.cs file? it's autogenerated , changes lost. you're not supposed edit manually.

just move lines form constructor same effect, right after call initializecomponent().


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

Bubble Sort Manually a Linked List in Java -

asp.net mvc - SSO between MVCForum and Umbraco7 -