I cannot seem to get this date picker working at all. I know it must be something I am doing wrong, but I just can’t seem to figure out what though. I commented out my css file thinking that maybe something was overriding the UI styles. But when I run this using firebug, it acts like no events are firing when I click either the text field or the icon.
Oh, and I should mention that my custom UI package contains ALL widgets. So, datepicker is part of that code.
Here is my test code;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<!--link rel="stylesheet" type="text/css" href="css/site.css" /-->
<link type="text/css" rel="stylesheet" href="css/jquery-ui-1.8.16.custom.css" />
<script type="text/javascript" src="/scripts/jquery-1.7.min.js"></script>
<script type="text/javascript" src="/scripts/jquery-ui-1.8.6.custom.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(function() {
$("#datepicker").datepicker({
showOn: "both",
buttonText: "Date",
buttonImage: "images/date_picker_icon.gif",
buttonImageOnly: true
});
});
});
</script>
</head>
<body>
<input type="text" name="date_entered" id="datepicker" class="icon-right" size="10" maxlength="10" />
</body>
</html>
It appears that I had mismatched versions of the jquery UI css versus the scripts. I downloaded a new bundle and it works fine now.