عثمان غني
عثمان غني

Reputation: 2708

bootstrap datepicker opening at wrong position

I am using bootsrap datepicker on user registraion form. I have triggered the datepicker using following code:

$(function(){
        $("#dob").datepicker({
            autoclose: true,
            format : 'mm-dd-yyyy',
            orientation: 'top'
        });
});

My HTML input looks like:

<div class="form-group">
    <div class="input text required" aria-required="true">
    <label for="dob">Dob</label>
    <input type="text" required="required" id="dob" placeholder="DD-MM-YYYY" class="form-control" name="data[User][dob]" aria-required="true"/>
   </div>
</div>

You can check it at link Normally datepicker works fine in my other projects. But unable to find the real issue in this project.

Upvotes: 0

Views: 7619

Answers (1)

kennasoft
kennasoft

Reputation: 1593

looks like you did an override of the rules for .dropdown-menu in style.css line 238 right: 0 !important;... maybe for a menu?. It's either you increase the specificity of that rule to match exactly where you want it changed, or it will continue to apply to any element with class .dropdown-menu, which I believe is also used by the date-picker html.

Good luck mate

Upvotes: 4

Related Questions