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

Calendar Control Won't Show Selected Date if Value Has Time Value != Midnight

I just noticed something weird about the calendar control in ASPNET2. If you assign a value to SelectedDate that has a time
component (e.g., 3/1/2007 10:37 AM), and you have a custom style for the selected day, the selected day will not be rendered using
the custom style. Instead, the control acts like >>no<< date has been selected.

I came across this when doing a SelectedDate='<%# Bind("date_field") %>', where the date_field is a datetime sql server field.
There's an obvious workaround -- use ((DateTime) Eval("date_field")).Date instead of the Bind expression -- but then you have to add
code to extract the value before, say, doing an update against the database, since you've lost the databinding (and Bind() does not
return a value; it binds values).

Of course, an even better workaround would be for the silly control to work right in the first place, and recognize that a
SelectedDate of 3/1/2007 10:37 AM is, in the context of a >>calendar<< equivalent to 3/1/2007 12:00 AM and should be treated as such
for purposes of deciding when to render using the SelectedDay style.

- Mark
Mar 7 '07 #1
5 2648
Hello Mark,

Regarding on the Calendar control SelectedDateStyle issue, I have checked
our internal database and this is an existing bug that has been already
reported. The problem is occuring when the selectedData be assigned a non
zero-end datetime instance. You can also found the bug entry in the public
feedback center:

http://connect.microsoft.com/VisualS...k.aspx?Feedbac
kID=105127

So far I think the workaround you mentioned should be the reasonable way.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 7 '07 #2
Steven,

Thanks for the link.

But I'm confused: the bug was confirmed over a year ago, and it's still not fixed? At last count I think I've downloaded, oh,
something over 200 patches from Microsoft for various Windows- and Office-related bugs in that time. What keeps the ASP.NET
Framework team from getting these kinds of fixes out sooner?

- Mark

On Wed, 07 Mar 2007 12:40:04 GMT, st*****@online.microsoft.com (Steven Cheng[MSFT]) wrote:
>Hello Mark,

Regarding on the Calendar control SelectedDateStyle issue, I have checked
our internal database and this is an existing bug that has been already
reported. The problem is occuring when the selectedData be assigned a non
zero-end datetime instance. You can also found the bug entry in the public
feedback center:

http://connect.microsoft.com/VisualS...dbackID=105127

So far I think the workaround you mentioned should be the reasonable way.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

================================================= =

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

================================================= =

This posting is provided "AS IS" with no warranties, and confers no rights.
Mar 7 '07 #3
Thanks for your reply Mark,

As for the windows update(or update of some other end user products like
office), they are different from the fixed for .net framework or visual
studio. For windows or office, we can frequently publish new update or
packs and the end user can choose to install them at their convenient time.
And different user may have different updated version on their machine.
However, for .net framework or visual studio, we can not publish such fix
or service pack frequently, because .net framework/visual studio is tools
and base component that used to build applications, frequent change on this
will result to inconsistency between developers that has installed
different updates or packs. Therefore, Visual Studio or .net framework
will only publish a large service pack after a long time(based on the
common fixed that has ever been collected). For individual users, if
necessary, CSS can help create on-demand hotfix, generally, this will be
userful if a certain server application require such as rapid fix.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 9 '07 #4
Steven,

I thought one of the benefits of managed code was to be able to run apps using different versions of the same library side-by-side
without any conflicts. In other words, no more DLL hell.

If that's so, why couldn't there be multiple versions of the same Framework libraries being used throughout the world? Granted, some
extra storage would be consumed, but that's pretty cheap these days.

- Mark
Mar 10 '07 #5
Thanks for your reply Mark,

Yes, .net framework make managed application and assembly easy to deploy
side by side or redirect version to version. However, this is for
individual applications and their custom assemblies. For system/framework
class library, they're always tightly coupled with the CLR runtime version.
That means when the process start CLR runtime, it will always load a fixed
version framework library(lots of system fundatmential assemblies such as
Mscorlib.dll, System.dll....). These assemblies can not be redirected to
different version individually, you could only redirect the entire
framework library's version(the runtime will load a different version of
NET CLR and framework libraries). So far this CLR loading mechanism still
limit the framework's versioning support, and it is not quite good to
change the framework base class library frequently.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 13 '07 #6

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

Similar topics

4
by: Naeem Sarfraz | last post by:
Platform: VS.Net, Unmanaged MFC C++ Application I used the "Add Class -> MFC -> MFC Class From ActiveX Control" wizard to generate a class for my charting control. Now I'm attempting to add the...
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...
0
by: Noel Volin | last post by:
Hi all, I have a customer server menu control that I downloaded from gotdotnet in order to learn a little more about custom controls. The problem is that everything works wonderfully if I view...
7
by: Grumpy Aero Guy | last post by:
I have a windows form project. I have added a mainmenu control which has several items with assoicated subroutines. I can not get the menu to display when I debug the application for anything....
1
by: afr0ninja | last post by:
Hello all, and thank you in advance for your assistance. I'm pretty new to access and I'm trying to teach myself some VBA by using various bits of code I find here and there mixed with my own....
13
by: MLH | last post by:
Would like to run the control panel's Internet Date & Time program from VBA - emulating opening it, clicking the Internet Time tab and the Update Now button. I don't really care for the user to...
1
by: Jamie87 | last post by:
I need to know how to display the current day,date,time,month and year on a form. I can only get it to say 'Monday' for the day and 'January' for the month etc. I cant get it to say the current...
2
by: rglaeser | last post by:
How do I add a calendar "box" to a Date and Tme field?
0
by: John Grandy | last post by:
For the standard ASP.NET Calendar control ( I'm not referring to the AJAX Control Toolkit ) : I am finding that the popup does not dismiss on click of an already-selected date. Are others...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
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...

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.