473,624 Members | 2,575 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calendar Control and postbacks

Hi. I posted yesterday about being able to get to Day.IsSelecteab le 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.Select edDate 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 1366
What event are you using to check the SelectedDate? Page_Load? The
Calendar object's SelectionChange d event? The SelectionChange d event
is the best choice.

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

On Thu, 13 Oct 2005 16:19:13 -0600, MattB <so********@yah oo.com>
wrote:
Hi. I posted yesterday about being able to get to Day.IsSelecteab le 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.Select edDate 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
1677
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
4594
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 Color 3. Foreground Color 4. Border Tickness 5. Border Color
2
3407
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 controls (i.e. roundedcorners component www.4guysfromrolla.com], buttons and panels) functions like a tab control. The buttons are programmatically designed to make the corresponding panel visible. Sample aspx.vb code:
1
1431
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 contained in the lower grid. The rows of the grid are derived unbound through an arraylist of objects that contain the column values. I am using Session Variables to store the arraylist contents on the inital Page_Load after making initial database...
3
850
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
9679
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, well, the date selected hasnt changed. Is there a calendar.clearSelection type method on the calendar I can use?
3
2722
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 assist with this. Thanks in advance. I have an access database that i have added a pop up calendar to, the Table information for the Date Reported field is Date/Time format short date, input mask is 00/00/0000.
1
1170
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 under all the other scenarios that might cause postbacks, but now when the user is simply changing the date of a Calendar control. Is there any way to determine what control caused the current postback so that I can determine whether my Calendar...
1
2831
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. my only problem is that i can not select today's date to display in the text box because by default, today's date is the selected date. <asp:UpdatePanel ID="UpdatePanel_start" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional"> ...
0
8249
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
8685
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
8633
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8493
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
6112
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
5570
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
4084
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
2613
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1797
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.