Rank: Advanced Member Groups: Member
Joined: 2/4/2009 Posts: 31
|
Hi!
I ran into an issue where the DatePicker SelectionChanged event is firing when it is not supposed to. Or at least I think it is not suppose to.
First, in the page load event I do a check for postback. If not postback, then I set the datepickers date using DatePicker1.SelectedDate = DateTime.Now;. This does not cause a SelectionChanged event.
Next, I use a button hooked to a callbackpanel to do a postback. At this point, I do not expect a SelectionChanged event, but I get one.
If I click the button again, it does not appear the SelectionChanged event is firing anymore.
I have a sample website if you would like it.
Thanks!
Brad
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Can you provide a test page? We won't be able to find much by looking at the sample website. But if you can provide the test page in source form we will be happy to take a look.
Thanks!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, We have looked into the code you sent to us and confirmed it is a bug. The bug has to do with the seconds of the DateTime value you passed to the DatePicker. A simple workaround does exist if you do not use the seconds value. You can change the code from:
Code: C#
DatePicker1.SelectedDate = DateTime.Now;
to
Code: C#
DatePicker1.SelectedDate = DateTime.Now.Date;
We will fix this bug in our next build. Thanks!
|