473,654 Members | 3,074 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SelectedDate Event not firing on calendar control when page loads

3 New Member
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.selec teddate = 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 1928
kenobewan
4,871 Recognized Expert Specialist
What do you mean manually? Use a client side event with JavaScript?
Feb 20 '07 #2
i3enners
3 New Member
What do you mean manually? Use a client side event with JavaScript?
what i mean is that if i set the selecteddate programmaticall y when the page loads it doesn't apply the selecteddatesty le 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 Recognized Expert Specialist
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
4068
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 = 1 b.forecolor = cc.ConvertFromString("red") b.BackColor = cc.ConvertFromString("white")
4
1784
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 I'm having some trouble with Netscape and events. In particular, the mousedown event doesn't work. The event fires, but I can't seem to get a handle on what html element was clicked. Any help would be appreciated. Here's the page:...
3
2557
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 details, their locations, and then add themselves to categories. Each category requires additional info from the suppliers, this additional category info is stored in its own DB table. a suppliers may add themselves to as many categories as required....
0
1139
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 page that needs to get the calPrimary.SelectedDate property each time the calPrimary.SelectionChanged event fires. So, my web user control is called "eNotes.ascx". It is supposed to connect to a database and retrieve all the user's notes for the day...
3
1702
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 with the use of the property myCalendar.SelectedDate = myDate Can someone help me out Thanks in Advance
5
7169
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 cannot get the visual demonstration of the selectedDate... I mean, if I check the selectedDate using code I can get it, but it's not shown visually.
3
3413
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 user should only be able to select one date. I've also set VisibleDate to DateTime.Now No love from my calendars though. On a post back it is detecting that today is selected, but it just won't show that visually on form load.
2
3910
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 well, so at times it is tempting just to port parts of it over mostly as-is. In fact, one MSDN article I read suggested using straight HTML wherever possible to make the app more efficient and less resource demanding. On one page there are 2...
1
2605
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 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
0
8376
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8290
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8815
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8594
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6161
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1596
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.