Sunday, 15 April 2012

internet explorer 8 - JQuery datepicker closes when changing month/year in IE8 -



internet explorer 8 - JQuery datepicker closes when changing month/year in IE8 -

i have issue jquery date picker work fine in chrome or in ie9, in ie8, close whenever clicks on month/year alter arrows @ top, or selects date, closes , displays random date within month selected (with current issue it's selecting 18th, i've seen select other dates - aside 1 clicked). we're using jquery 1.8.0 , other frameworks (underscore , knockout) throughout product, other frameworks not in utilize on other pages

this internal system, it's not out in wild, unfortunately, our users constrained having ie8 on windows xp , chrome disallowed our network administrators. while can debug , see work in ie9 or chrome, that's of no help our users.

js code:

$(function () { $('.date-field').each(function () { var $this = $(this); if ($this.data('bound')) return; $this.datepicker({ format: 'dd-mm-yyyy' }).data('bound', true); }); });

html code:

<input type="text" class="span3 date-field" name="fromdate">

there other javascript in many of pages, , other functions in page in question, there's much paste , in case there no errors beingness thrown consoles (ie8/9 or chrome) when debugging javascript - it's closing datepicker when clicked , not setting value.

i'm little confused - i've googled around , although can find other issues datepickers closing, they're around them not closing , of them appear on right track not answered. i've tried upgrading jquery version 1.9.0, it's made no difference - problem , behaviour persist.

i've set jsfiddle - http://jsfiddle.net/mcvay/7/ - encapsulates problem, - irritatingly - jsfiddle seems not work under ie8... (or maybe i'm doing wrong - it's ie8 standards/browser mode within ie9 have test i'm on win 7 not xp...)

any help received, please allow me know if can provide more information.

this downwards datepicker bootstrap, had been included in project , i'd not noticed, , not jquery datepicker. explains why format attribute beingness used instead of dateformat set format of displayed date, , why hard find reply issue!

there issue on forum relates same problem: https://github.com/eternicode/bootstrap-datepicker/issues/144

updating latest version fixed issue.

jquery internet-explorer-8

No comments:

Post a Comment