Solved

How do I clear a selection in monthcalendar in csharp?

Posted on 2014-11-30
2
185 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
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
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.
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…
This video discusses moving either the default database or any database to a new volume.

772 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

11 Experts available now in Live!

Get 1:1 Help Now