0

I am using below script for date picker in JQuery:

         $('#dob').datepicker({
            minDate: new Date(1900,1-1,1), maxDate: '-18Y',
            dateFormat: 'dd-M-yy',
            changeMonth: true,
            changeYear: true,
            yearRange: '-100:-18'
        });

But Date picker goes under the table and only header portion is showing rest portion are hide into the table.

I have tried with below css which I putted in style.css but not solved.

.ui-datepicker{ z-index: 9999 !important;}

How to solve this issue? Please help

1 Answer 1

2

Use z-index while calling the function like this

$('#dob').datepicker({
    minDate: new Date(1900,1-1,1), maxDate: '-18Y',
    dateFormat: 'dd-M-yy',
    changeMonth: true,
    changeYear: true,
    yearRange: '-100:-18',
    //comment the beforeShow handler if you want to see the ugly overlay
    beforeShow: function() {
        setTimeout(function(){
            $('.ui-datepicker-div').css({'position': 'relative', 'z-index': 99999999999999});
        }, 0);
    }
});
Sign up to request clarification or add additional context in comments.

7 Comments

I also need to add the parameter which I used in my posted example . How Can use those parameter with your method?
I'm not sure if this is the problem, but IE<9 (or 10?) doesn't know about values lower than 10ms on setTimeout.
Due to this position absolute date picker goes below of the page
sry about the miss css should apply on .ui-datepicker-div. Try and tell me its working??
Still not working. Still its showing only header of datepicker in all browser.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.