?
Solved

Programmatically change calendar control date

Posted on 2007-11-29
2
Medium Priority
?
549 Views
Last Modified: 2012-06-21
I have a page where a user enters a date and clicks enter. The date is assigned to a variable:
dtSelectedDate has the value "4/12/2009"
Me.Calendar1.SelectedDate = dtSelectedDate  

I want to change the calendar control to that date. The date is highlighted but the calendar control is on the wrong month and year. I have to scroll to the right month and year manually where the proper date is highlighted.

How do I get the calendar to programmatically select the proper month and year?
0
Comment
Question by:bertino12
[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 3

Expert Comment

by:j-w-thomas
ID: 20374051
What kind of control is the Calendar1 ? Is it an actual ASP calendar control?

just clarifying
0
 
LVL 16

Accepted Solution

by:
TSmooth earned 2000 total points
ID: 20374054
You need to also set the calendar's "VisibleDate" property to that date.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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…
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
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