473,396 Members | 1,968 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,396 software developers and data experts.

SelectedDate Event not firing on calendar control when page loads

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 in the page load event it doesn't apply the style so my user's cannot see what date is actually selected.

I am simply using the code

calendar1.selecteddate = now()

this doesnt style the calendar.

is there some way of forcing the selected date event to fire manually???

thanks
Feb 19 '07 #1
3 1920
kenobewan
4,871 Expert 4TB
What do you mean manually? Use a client side event with JavaScript?
Feb 20 '07 #2
What do you mean manually? Use a client side event with JavaScript?
what i mean is that if i set the selecteddate programmatically when the page loads it doesn't apply the selecteddatestyle to the day i have chosen but if i click on a date with my mouse then it does.

I will have a look at firing the event through javascript but this would mean i would be refreshing the page as soon as it loads which is a bit nasty.

thanks
Feb 20 '07 #3
kenobewan
4,871 Expert 4TB
Maybe using this in your page load will help:
Expand|Select|Wrap|Line Numbers
  1. DateTime.Now.Date.AddDays(5)
If you wanted 5 days from now...
Feb 21 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Aymer | last post by:
i created a new button object. how do i attach an event on it? thanx for your help. Dim cc As ColorConverter = new ColorConverter() Dim b = new button() b.ID = "SelectedDate" b.BorderStyle...
4
by: Jesse Wade | last post by:
Hello people. Does the world need another DHTML popup calendar? Probably not, but I'm writing one anyway. It's unique in that it allows drag selection of a range of dates. Works great on IE6 but...
3
by: Tim Thomas | last post by:
Hi, I am very new to .NET and am in the process of building my first web application. I will briefly describe what i am trying to achieve: I have a system where suppliers register their...
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...
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...
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: Steven Nagy | last post by:
Hey all, On page load I am setting the selected date to DateTime.Now but its not appearing as selected when the page loads. I have set the selection mode to CalendarSelectionMode.Day since the...
2
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite...
1
by: Leon_Amirreza | last post by:
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.