473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

SelectedDate problem with Calendar!?

When I Set the Calendar.SelectedDate Property programatically that Day's
style doesnt change according to the styles set in Calendar property so the
user wont see the change in SelectedDate

BUT
when the user changes the SelectedDate by mouse clicks that Day's style
changes and the user can distinguish the SelectedDate from others in the
Calendar

Dec 7 '07 #1
1 2597
Helo Leon
When I Set the Calendar.SelectedDate Property programatically that Day's
style doesnt change according to the styles set in Calendar property so
the user wont see the change in SelectedDate

BUT
when the user changes the SelectedDate by mouse clicks that Day's style
changes and the user can distinguish the SelectedDate from others in the
Calendar
Let me guess (i have no other choice):
You set the date like that: this.Calendar1.SelectedDate = DateTime.Now

This dont work, the reason is simple.
Have a look to my blog post refering to this:
-
http://www.aspnetzone.de/blogs/peter...ol-setzen.aspx

--
Gruss, Peter Bucher
Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerland
http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET

Dec 7 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Luis Esteban Valencia | last post by:
Hi folks, I have a problem using the Calendar Control. Let me explain: On my first page, "Default.aspx", I have a calendar control named "calPrimary". I then have a Web User Control on the...
0
by: 00_CuMPe3WaR3D12 | last post by:
In my Page_Load, I have this: uiStartDateCalendar.SelectedDate = Convert.ToDateTime("8/15/2005"); When it shows up in the ASPX page, it doesn't go to August page directly, it stays on Feburary...
3
by: Xarky | last post by:
Hi, I am placing a Calendar on my page. Now I am dynamically changing the selected date property. The Calendar remains on today's date. I would like to show the date that has been set by me...
1
by: K B | last post by:
Hi, I have a calendar control inside an EditItemTemplate. All works great except when the date field in the db is Null. I get the 'cannot cast string to datetime type' error. I haven't...
2
by: Jason James | last post by:
Hi all, I use a calendar control in an ASP.NET form that is used to capture the date of a specific task. I want to be able to show this date at some future point in time by setting the...
0
by: targus | last post by:
Please help, I need a solution to this problem. What I want to do: I have a history grid that gets filled with 2 weeks data prior to a specified date. The user picks the specified date from the...
5
by: Victor Reboucas | last post by:
Hi, I'm sure I'm missing something here, but.... I have a asp.net 2.0 web form and a calendar control. If I set the selectedDate clicking the control, no problem, but, if I set it using code I...
3
by: i3enners | last post by:
Hello I am having problems with the ASP.Net calendar control. I have a style i apply to the selected date which works fine if i load the page then click on a date but when i set the selected date...
0
by: Nathan Sokalski | last post by:
I have a small form on my ASP.NET page that contains a Calendar control. I want to create a Reset button for the form using JavaScript. This is easy for controls that map directly to html tags,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.