Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
70
rated 0 times [  72] [ 2]  / answers: 1 / hits: 33882  / 11 Years ago, mon, june 3, 2013, 12:00:00

I'm trying to display a datepicker in a popover (using bootstrap and bootstrap-datepicker extension) and having some issues,
first I had a problem with displaying the datepicker and found this topic : Datepicker in Popover Won't display
,but now it's displaying behind my popover so it's not fully visible



Here is the HTML code :



<button type=submit class=btn btn-primary pop_doleance rel=popover data-original-title=Ajouter doléance>Ajouter doléance</button>

<div style=display: none class=pop_doleance_content>
<form class=well form-inline form_doleance>
<label for=date>Date : </label>
<input id=date type=text class=input-medium>
</form>




And the Javascript code :



var tmp = $.fn.popover.Constructor.prototype.show;
$.fn.popover.Constructor.prototype.show = function (){
tmp.call(this);
if (this.options.callback) {
this.options.callback();
}
}

$(function (){
$(.pop_doleance).popover({
placement:'bottom',
html : true,
content: function(){return $('.pop_doleance_content').html();},
callback: function(){$('#date').datepicker();}
});
});


Any ideas ?


More From » jquery

 Answers
5

set popup's z-index to a lower value.



.popup { z-index : 900; }


and set datepicker's container z-index to a higher value like in case of jquery ui datepicker set



.ui-datepicker-div { z-index: 999; }

[#77848] Saturday, June 1, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kourtney

Total Points: 368
Total Questions: 103
Total Answers: 85

Location: Bonaire
Member since Sat, May 1, 2021
3 Years ago
kourtney questions
Sun, Oct 4, 20, 00:00, 4 Years ago
Tue, Oct 29, 19, 00:00, 5 Years ago
Thu, Apr 4, 19, 00:00, 5 Years ago
Fri, Mar 1, 19, 00:00, 5 Years ago
;