?
Solved

How do I clear a selection in monthcalendar in csharp?

Posted on 2014-11-30
2
Medium Priority
?
352 Views
Last Modified: 2014-12-16
After making a selection in monthcalendar and acting on it I wish to remove the highlighting programmatically.  Is there a method for doing so?  I've tried setting it to a non-displayed date but the calendar helpfully scrolls to that month which is not what I want.
0
Comment
Question by:agelders
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Expert Comment

by:MikeToole
ID: 40474402
A monthcalendar?
What is it, how are you using it, Windows forms, ASP, WPF ????
0
 
LVL 21

Accepted Solution

by:
MogalManic earned 2000 total points
ID: 40474638
I am assuming that you are talking about the MonthCalendar control in the System.Windows.Forms namespace.

It looks like you cannot set the selected date range to nothing selected.  The ResetSelectedRange() method sets the selected date to the current date.    You can either use readonly textboxes (have them set by the DateChanged event)

Or use the DateTimePicker control.  This control allows you to set the selectedDate to NULL.
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question