Skip to content
Browse files

MDL-39332 Formslib: remove z-index from calendar panel

calendar panel.render() sets zIndex to 0, when calendar is used next to filepicker, it overlaps
zIndex should be set by css and not JS, and previously used removeAttr on panel breaks JS on ie8.
So solution is to render panel and then remove z-index from dom
  • Loading branch information...
Rajesh Taneja
Rajesh Taneja committed May 3, 2013
1 parent cf5a329 commit 5e0ab6704a6b231fb17d2112d29add7bbf9fa572
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/form/yui/dateselector/dateselector.js
@@ -204,8 +204,11 @@ YUI.add('moodle-form-dateselector', function(Y) {
bodyContent : Y.Node.create('<div id="dateselector-calendar-content"></div>'),
id : 'dateselector-calendar-panel'
this.panel.removeAttr('zIndex'); // z-index is set by the theme.
// zIndex is added by panel.render() and is set to 0.
// Remove zIndex from panel, as this should be set by CSS. This can be done by removeAttr but
// ie8 fails and there is know issue for it.'#dateselector-calendar-panel').setStyle('zIndex', null);
this.panel.on('heightChange', this.fix_position, this);'#dateselector-calendar-panel').on('click', function(e){e.halt();});

0 comments on commit 5e0ab67

Please sign in to comment.
You can’t perform that action at this time.