473,406 Members | 2,705 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,406 software developers and data experts.

DotNet2.0 Calendar SelectedDate

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.

Any ideas?

Thanks,
Steven

Dec 8 '06 #1
3 3393
"Steven Nagy" <le*********@hotmail.comwrote in message
news:11**********************@j72g2000cwa.googlegr oups.com...
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.

Any ideas?
Well, what happens differently on post back...?
Dec 8 '06 #2
What happens if you set SelectedDate and VisibleDate in the Init event? The
Init event happens earlier than Load, and it is the event where setting
values that are not determined by postback values are usually set.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Steven Nagy" <le*********@hotmail.comwrote in message
news:11**********************@j72g2000cwa.googlegr oups.com...
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.

Any ideas?

Thanks,
Steven

Dec 10 '06 #3
That solved it Nathan.
Although I thought the only stuff to go in Init would be pre-viewstate
stuff (like setting up datagrid columns, etc). I thought that anything
like this would actually go into PreRender but it wasn't working there
either.

Thanks team!

Dec 13 '06 #4

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

Similar topics

2
by: D. Shane Fowlkes | last post by:
http://www.drumpub.com/caltest.aspx Check the test page at the above link. Could someone please tell me why I'm capturing the calendar's SelectedDate "one post behind"? The source code is on...
3
by: Hutty | last post by:
I'm trying create a calendar control that updates an access database with events. I have some code I managed to piece together. First error I'm running into is the Mycommand.ExecuteNonQuery(). I...
2
by: Mariano Padilla | last post by:
The calendar control only has the event of SelectionChanged to detect if the user clicks on the calendar. I have 2 calendars on a form, one for arrival date one for departure date. Every time a...
1
by: Loading name... | last post by:
Hey asp.net 2.0 I have a FormView on my webpage. This FormView's datasource is a SqlDataSource object. This SqlDataSource returns 1 datetime field. So I've added a Calendar control to 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...
4
by: ShyGuy | last post by:
A while back I had found a link to a popup calendar that had a small button that was placed to the right of any text box. By clicking on the icon and selecting a date the text box was updated with...
0
by: mathewgk80 | last post by:
HI all, I am having popup calendar Javascript code. But i dont know how it is connecting to asp.net code.. I am using asp.net,c#.net and also using 3tier architecture with master page.... I...
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
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
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.