• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 530
  • Last Modified:

How to custom colorize calendar days in the DateTimePicker control

I know that cracking open the DateTimePicker control and customizing it isn't possible.  I was,  however, wondering if I could wrap it or inherit from it in a way that allowed me to customize my own "colorDay" feature in calendar-mode.   I have no problem inheriting from the DateTimePicker control (if that is the best solution); the tricky part for me is actually color-coding the days programmatically.   Also this is an existing program that is in production, so I'd rather not swap it out for a totally unrelated control (even if that control behaved as described above).

Thanks.
0
David L. Hansen
Asked:
David L. Hansen
  • 2
  • 2
1 Solution
 
SStoryCommented:
0
 
David L. HansenProgrammer AnalystAuthor Commented:
That looks like a great control, however, it didn't seem to have any features that I've described.
0
 
SStoryCommented:
I think I'd about prefer to write my on calendar than try to do it.  All controls are painted and I'm sure you can violate it by subclassing it and capturing messages, etc. but that would not be pretty and would require you drawing the days too I think.

Here's the kind of stuff you'll be looking at if you subclass it:
http://www.codeproject.com/Articles/6664/DateTimePicker-appears-flat

This looks awesome however, and may do what you need:
http://www.codeproject.com/Articles/10840/Another-Month-Calendar

Good luck!
0
 
David L. HansenProgrammer AnalystAuthor Commented:
That last link is perfect...Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now