datepick() not getting properly styled
in my page i load both a themeroller's css and the datepick css:
- <link rel="stylesheet" type="text/css" href="css/smoothness/jquery-ui-1.8.11.custom.css">
- <link rel="stylesheet" type="text/css" href="css/ui-smoothness.datepick.css">
An of course the datepick library:
- <script type="text/javascript" src="js/jquery.datepick.min.js"></script>
- <script type="text/javascript" src="js/jquery.datepick.ext.min.js"></script>
Then from a method of mine I run the following code:
- div1.append('<div class="smallerpanel">');
- div1.append('<input id="date1" type="text"/>\n');
- div1.append('</div>');
- var date1=$("#date1");
- date1.keypress(function(event) {
- event.preventDefault();
- });
- date1.keydown(function(event) {
- event.preventDefault();
- });
- date1.datepick({
- dateFormat: 'dd-mm-yyyy',
- minDate:mindate
- });
The problem is, the datepicker appears but won't get styled correctly. It appears on the opposite side of the page, half hidden under my openlayers map, it has no background and the dates aren't buttons but text. The browser seems to be loading all the css files correctly. What's the error then?