Selecting and deselecting dates in calendarendar

Posted on 2011-10-23
Last Modified: 2012-05-12
Hello experts,

I need some code to prevent the selection of already selected dates, and allow the selection of dates that have not yet been selected in calendar.

Question by:adamtrask
    LVL 29

    Expert Comment

    by:Kumaraswamy R

    ssigned the selected dates back based from the list values at SelectionChanged event

    Author Comment

    Thanks rkworlds: for your response.

    I actually use a generic Dictionary to store  dates with color and text assigned to the selected e.cell.

    My idea is to prevent the user from mistakenly selecting a new date that is already selected.

    This would cause an error in the Dictionary and the database since the item.key would not be unique.


    Accepted Solution

    Thanks.... I believe I found what I needed:

     If e.Day.IsSelected = True Then
                e.Day.IsSelectable = False
                e.Day.IsSelectable = True
            End If

    Author Closing Comment

    My reason for accepting my own comment as the solution are.

    I posted the question yesterday morning and didn't get the right response.

    In the meantime I've been playing around with code until I got the right answer.

    Thanks all the same

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    734 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

    24 Experts available now in Live!

    Get 1:1 Help Now