views:

49

answers:

0

Can anyone confirm a bug in System.Web.WebControls.Calendar?

If specify not only a date but also a time for Calendar.SelectedDate it will ignore setting of Calendar.VisibleDate.

This works (calendar shows date selection rectangle):

var calendar = new System.Web.WebControls.Calendar();
calendar.CurrentDate = DateTime.Today;
calendar.VisibleDate = calendar.CurrentDate;

This - not:

var calendar = new System.Web.WebControls.Calendar();
calendar.CurrentDate = DateTime.Now; // here the problem is
calendar.VisibleDate = calendar.CurrentDate;

I found a number of posts about this topic: this and this. Even a feedback on Microsoft.Connect. Why Microsoft hadn't fixed it??