473,396 Members | 2,037 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.

Calendar Control and postbacks

Hi. I posted yesterday about being able to get to Day.IsSelecteable from
outside the calendar's DayRender event. I never figured that out, so I
found another way to do what I needed by externalizing the logic that
sets the calendar days as selectable or not and using that same logic
elsewhere. I thought I had the problem solved, but I noticed something
unexpected.

When I change the selected date in the calendar by clicking on it, my
logic fires to see if the selected date is valid, but the date returned
by Calendar.SelectedDate is the one that was selected before I clicked
on it, not the date I clicked on. This is not what I was expecting.
Anyone know how to get around that? I want to know the date being
clicked on, not the previously selected one.

Thanks!

Matt
Nov 19 '05 #1
1 1352
What event are you using to check the SelectedDate? Page_Load? The
Calendar object's SelectionChanged event? The SelectionChanged event
is the best choice.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 13 Oct 2005 16:19:13 -0600, MattB <so********@yahoo.com>
wrote:
Hi. I posted yesterday about being able to get to Day.IsSelecteable from
outside the calendar's DayRender event. I never figured that out, so I
found another way to do what I needed by externalizing the logic that
sets the calendar days as selectable or not and using that same logic
elsewhere. I thought I had the problem solved, but I noticed something
unexpected.

When I change the selected date in the calendar by clicking on it, my
logic fires to see if the selected date is valid, but the date returned
by Calendar.SelectedDate is the one that was selected before I clicked
on it, not the date I clicked on. This is not what I was expecting.
Anyone know how to get around that? I want to know the date being
clicked on, not the previously selected one.

Thanks!

Matt


Nov 19 '05 #2

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

Similar topics

2
by: Karthik Seetharaman | last post by:
http://demos.deloittes.net/datepicker/default.aspx How do they construct it ? overriding the postback but still capturing the date ?
5
by: Miguel Dias Moura | last post by:
Hello, i am trying to create a .css file with several styles and apply them to the calendar control so i can change the look of: 1. Text Type and Format (Bold, Underline, etc) 2. Background...
2
by: Caesar Augustus | last post by:
First, let me start by saying my asp.net experience is still in it's infancy so please bare with me as I try to explain my situation. I have created a single page that with the use of many...
1
by: hazz | last post by:
I have two arraylists that populate two Grid controls. I have two Calendar controls to select a 'From' and 'To' date to filter what is in the grid for subsequent filtered views of the what is...
3
by: Peter | last post by:
Is there anyway to make the System.Web.UI.WebControls.Calendar to display only Month Name and Year, like: January, 2006 February, 2006 ..... .... .... ....
24
by: =?Utf-8?B?Tkg=?= | last post by:
I have a basic calendar and a SelectionChanged event (asp.net 2.0). How can I handle it when a user chooses the same date again, in this case the SelectionChanged event is not fired because,...
3
by: thorpk | last post by:
I posted this problem earlier in the month and some one decided it was better to change the subject and ask a completely different question. I am therefore reposting. I am hoping some one can...
1
by: Nathan Sokalski | last post by:
As we all know, the Calendar control causes postbacks that we often do not want. This will obviously cause the Page's Load event to be triggered. I have code in my Load event that I want executed...
1
by: phpmel | last post by:
Hi guys, I have an asp calendar control, text box, calendar icon, eraser icon all within an update panel. The calendar works fine, postbacks are handled without the flickering of the screen etc....
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?
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...
0
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...
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
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...
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,...
0
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...

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.