Skip to content

Commit 3bbd48d

Browse files
committed
fix incorrect shown datepicker in jquery1.7.1 + webkit
1 parent 6be7631 commit 3bbd48d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

js/bootstrap-datepicker.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,17 @@
655655
if (dir) {
656656
this.viewMode = Math.max(0, Math.min(2, this.viewMode + dir));
657657
}
658-
this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show();
658+
/*
659+
vitalets: fixing bug of very special conditions:
660+
jquery 1.7.1 + webkit + show inline datepicker in bootstrap popover.
661+
Method show() does not set display css correctly and datepicker is not shown.
662+
Changed to .css('display', 'block') solve the problem.
663+
See https://github.com/vitalets/x-editable/issues/37
664+
665+
In jquery 1.7.2+ everything works fine.
666+
*/
667+
//this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show();
668+
this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).css('display', 'block');
659669
this.updateNavArrows();
660670
}
661671
};

0 commit comments

Comments
 (0)