Solved

How do I clear a selection in monthcalendar in csharp?

Posted on 2014-11-30
2
217 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
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 500 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

813 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now