Click here to Skip to main content
Sign Up to vote bad
good
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:31


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.
  Permalink  
Comments
Abdul Rahman Hamidy - 8 Nov '12 - 13:00
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:49
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:44
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
Your Filters
Interested
Ignored
     
0 OriginalGriff 218
1 Ron Beyer 215
2 Aarti Meswania 190
3 Rohan Leuva 178
4 Mahesh Bailwal 160
0 Sergey Alexandrovich Kryukov 8,553
1 OriginalGriff 6,899
2 CPallini 3,648
3 Rohan Leuva 2,963
4 Maciej Los 2,308


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 8 Nov 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid