'jQueryUI Datepicker not displayed properly in Safari browser

Since input type=date is not supported in a few browsers, I am using jquery UI for displaying a datepicker for such browsers. This is my code:

    if ($('.date-field').prop('type') != "date"){ //if browser doesn't support input type="date", load files for jQuery UI Date Picker
        $("input[type='date']").datepicker({
            dateFormat: 'dd-mm-yyyy',
            changeMonth: true, 
            changeYear: true,
            yearRange:  '-100:-0'
        });
    }

It works in IE but this is how it looks in safari

enter image description here

Please help me out with this.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source