Skip to content

Commit

Permalink
simplepicker: fix error with setting z-index.
Browse files Browse the repository at this point in the history
  • Loading branch information
priyank-p committed Sep 2, 2018
1 parent 4c4e8a0 commit 5be21ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@
</head>
<body>
<button class="simplepicker-btn">Show Picker</button>
<div></div>
<div class="event-log">Event logs:<br></div>

<script src="dist/simplepicker.js"></script>
<script>
let simplepicker = new SimplePicker('div');
let simplepicker = new SimplePicker({
zIndex: 10
});

simplepicker.open();

const $button = document.querySelector('button');
Expand Down
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ class SimplePicker {
this.updateDateComponents(today);

opts = opts || {};
if (opts.zIndex) {
this.$simplepickerWrapper.display.zIndex = opts.zIndex;
if (opts.zIndex !== undefined) {
this.$simplepickerWrapper.style.zIndex = opts.zIndex;
}
}

Expand Down

0 comments on commit 5be21ba

Please sign in to comment.