Solved

How do I clear a selection in monthcalendar in csharp?

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

688 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