Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Programmatically change calendar control date

Posted on 2007-11-29
2
Medium Priority
?
550 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

Technology Partners: 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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

636 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