Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Created Issue: Calendar Control fails to honour set_selectedDate after calendar is displayed [27248]

$
0
0
I have the latest version of the toolkit running in IE8. I have a website that uses calendar extender. The text box is set to read-only.

If I load the page and click on the drop-down the date I have defaulted from the server side is correctly displayed. I also have a 'duration' box that fires an onchange event. When this event fires I invoke set_selectedDate on my calendar extender behaviour. My server is running in the UK with British Summer Time as the timezone.

The first thing I have noticed is that I need to modify the date passed into set_selectedDate as follows:

var dtFrom = Date.parseLocale(txtFrom.value);
dtTo = new Date(dtFrom.getTime() + (1000 * 60 * 60 * 24 * parseInt(duration.value, 10)));
var adjusted = new Date(dtTo.getTime() - (dtTo.getTimezoneOffset() * 60000) + (24 * 60 * 60 * 1000));
txtTo.value = dtTo.localeFormat('d');
var ctrl = $find('txtTo_CalendarExtender');
ctrl.set_visibleDate(adjusted.format('MM/dd/yyyy'));
ctrl.set_selectedDate(adjusted.format('MM/dd/yyyy'));

to make the dates consistent with those returned by _selectedDate.

The second thing is that once the calendar has displayed, even if I change the date in the text box it is not honoured either by reading from the text box on display or by the call in the onchange handler in the duration box (attached to another text box) that sets the selected date.






Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>