Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All, I would like to focus the datetimepicker control and show up the calender. I can simply do the task but i want to remove the focus from the today date (current date) when the calender pops up.


any idea please?

Thanks,
Posted

1 solution

All you have to do is set the value of the control to the date that you want it to focus on.
You can't set the value to null because the DateTimePicker simply doesn't allow for that.
 
Share this answer
 
Comments
Abdul Rahman Hamidy 8-Nov-12 13:00pm    
Thanks, I have already done with null value, and pop up while focusing the control, I am only concern with the focus of current date as when it show down (shows the calender) you can see by default it select today date, but i don't want it that way, I want it to focus the date i want when exactly it pops up.
fjdiewornncalwe 8-Nov-12 13:49pm    
Just set the value of your DateTimePicker.value property and it will show that one by default when it opens up.
Abdul Rahman Hamidy 10-Nov-12 0:44am    
Thanks, I don't want to set the value and neither i want it to focus, I only want to show the calender without focusing on the date. I want it to only pop up. no focus on the day.

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