Click here to Skip to main content
13,097,884 members (56,084 online)
Rate this:
Please Sign up or sign in to vote.
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?

Posted 8-Nov-12 5:31am

1 solution

Rate this: bad
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.
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 |
Web02 | 2.8.170813.1 | Last Updated 8 Nov 2012
Copyright © CodeProject, 1999-2017
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