Welcome Guest Search | Active Topics | Sign In | Register

DatePicker SelectionChanged event firing issue Options
Brad Coble
Posted: Monday, March 22, 2010 12:11:47 PM
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
eo_support
Posted: Monday, March 22, 2010 1:13:52 PM
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!
eo_support
Posted: Monday, March 22, 2010 4:14:53 PM
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!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.