Click here to Skip to main content
12,503,681 members (56,060 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#
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 8-Nov-12 5:31am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
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.
Marcus Kramer 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160919.1 | Last Updated 8 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100