This is a migrated thread and some comments may be shown as answers.

Datepicker appearing behind dialog

2 Answers 124 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Christopher Ronak
Top achievements
Rank 1
Christopher Ronak asked on 10 Jun 2010, 10:51 PM
I'm using a datepicker on a Jquery-UI dialog and the calendar appears behind the dialog.
I've set the z-index of the dialog to be 0. I tried both htmlattributes and Inputhtmlattributes z-index, and still no luck. The input box appears fine, but when i click on the button for the calendar, it's hidden.

Here's my call:
<%= Html.Telerik().DatePicker() 
    .HtmlAttributes(new{style="z-index:1000"}) 
          .Name("NewLaborHireDate") 
          .Format("yyyy-mm-dd") 
          .InputHtmlAttributes(new { style = "z-index:1000" }) 
          .ShowButton(true) 
%> 
 


Thanks for your help,

Chris

2 Answers, 1 is accepted

Sort by
0
dstj
Top achievements
Rank 1
answered on 14 Jul 2010, 01:54 AM
Hi,

Did you ever get an answer on this ?

I've got the same problem with my DatePicker in a jQuery Fancybox: the calendar is appearing behind the fancybox popup.

Dominic.
0
Yitzhak Khabinsky
Top achievements
Rank 1
answered on 05 Oct 2010, 07:10 PM
We had the same problem.
The solution was to set jQuery UI dialog z-index, instead of the Telerik Datepicker, like the following snippet:
    $("#NewFeeDialog").dialog({
        autoOpen: false,
        modal: true,
        height: 200,
        width: 400,
        position: 'center',
        resizable: false,
        zIndex: -1,
        overlay: {
            backgroundColor: '#000',
            opacity: 0.9
        },
        buttons: {
            "Submit": function() {
                if ($("#newFee").text().trim() == "") {
                    $(this).dialog("close");
                }
                else {
                    $("#NewFeeForm").submit();
                }
            },
            "Cancel": function() {
                $(this).dialog("close");
            }
        }
    });

Regards,
Yitzhak
Tags
Date/Time Pickers
Asked by
Christopher Ronak
Top achievements
Rank 1
Answers by
dstj
Top achievements
Rank 1
Yitzhak Khabinsky
Top achievements
Rank 1
Share this question
or