Previously, when I tried this process it worked fine. However, now that I am following the same steps, it is not working as expected.
<script src="scripts/jquery-1.6.1.min.js" type="text/javascript"></script>
<script src="scripts/jquery.ui.datepicker.js" type="text/javascript"></script>
$(document).ready(function() {
$("#<%=txtDateOfBirth.ClientID %>").datepicker({
changeMonth: true,
changeYear: true,
yearRange: "-50:+0"
});
$("#<%=txtDateOfBirth.ClientID %>").datepicker({ autoSize: true });
//getter
var autoSize = $("#<%=txtDateOfBirth.ClientID %>").datepicker("option", "autoSize");
//setter
$("#<%=txtDateOfBirth.ClientID %>").datepicker("option", "autoSize", true);
$('#<%=imgDateOfBirth.ClientID %>').css({ 'cursor': 'pointer', "vertical-align": 'middle' });
$("#<%=imgDateOfBirth.ClientID %>").click(function () {
$('#<%=txtDateOfBirth.ClientID %>').datepicker('show');
});
});
I have also applied CSS to the content.
All of these elements are within a content placeholder.