Click here to Skip to main content
15,885,890 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to set my favorite date to calendar and calendar should work according to my date.

I want set my calendar date to 10/2/2107 and it must increment it is day after each day, I mean when I open my application tomorrow calendar date must be change to 10/3/2017 and when I open the day after tomorrow the date must be change to 10/4/2017 and so on....

but when I open my Application calendar get the system date I don't need the system date I need my own calendar date.

for more Details I add a few pictures.

What I have tried:

this.monthCalendar1.TodayDate = new System.DateTime(2017, 10, 3, 0, 0, 0, 0);


but when I open my Application calendar get the system date I don't need the system date I need my own calendar date.

for more Details I add a few pictures.
Posted
Updated 12-Nov-17 19:27pm

1 solution

Try change the custom format in datetimepicketr's property
the format will be like MM/DD/yyyy
 
Share this answer
 
Comments
Member 13493074 26-Nov-17 2:34am    
thanks dear Nowfer Rifkan from your solution if I change custom format in datetimepicker's property is it become independent of system date.
Nowfer Rifkan 27-Nov-17 0:49am    
it is independent of system's date format. if you want to make your own date when you run the application try this >>
dtpDate.Text = Convert.ToDateTime("22/11/2017").ToString();

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900