简体   繁体   中英

JQuery datepicker month dropdown border not showing properly in firefox

I am using bootstrap, and jQuery datepicker. When I am clicking the date field, and want to change the month the border not showing properly. Please have a look on image:

在此输入图像描述

here is HTML:

<div class="col-sm-4 control-group" id="datepicker1">
    <label for="dob" class="control-label">Date of Birth (A.D)</label>
    <input type="text" id="datepicker" maxlength="20" value="${criteria.dateOfBirthAD}" class="form-control input-sm req" name="dateOfBirthAD"/>
</div>

and the Javascript:

$("#datepicker").datepicker({
    onSelect: function(value, ui) {
        var today = new Date(),
                dob = new Date(value),
                m = today.getMonth() - dob.getMonth(),
                age = today.getFullYear() - ui.selectedYear;
        if (m < 0 || (m === 0 && today.getDate() < dob.getDate())) {
            age--;
        }

        if (age < 18) {
            $('#datepicker1').addClass('has-error');
            jAlert("At least 18 year required for apply");
        }
        else {
            $('#datepicker1').removeClass('has-error').addClass('has-success');
        }
    },
    maxDate: new Date(),
    changeMonth: true, 
    changeYear: true, 
    dateFormat: "yy/mm/dd"
});

Try reducing the font size of the date picker.

div.ui-datepicker {
    font-size: 62.5%;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM