JQuery datepicker keeps showing when closed in IE7

I have a problem with the datepicker parameter, which constantly appears when I click Finish. But only in IE7, and not in Firefox, does it remain hidden. I suspect the problem is that the datepicker is displayed in focus and the host input is redirected to IE when the datepicker is closed and it reappears.

JQ 1.3.2 (also tried 1.4.2) JQUI 1.7.2.

$(".period").datepicker({ clickInput: true, dateFormat: 'MM yy', changeMonth: true, changeYear: true, showButtonPanel: true, onClose: function(dateText, inst) { ... $(this).datepicker('setDate', new Date(year, month, 1)); } }); 
+4
source share
1 answer

Here's the fix (adapted from this jQuery forum thread ): change

 $(this).datepicker('setDate', new Date(year, month, 1)); 

to

 $(this).val($.datepicker.formatDate('MM yy', new Date(year, month, 1))); 
+3
source

All Articles