jQuery Datepicker element id not resolving
I am trying to attach a datepicker to an input box. I want to pass the name into the javascript as there are 20 date fields on the page.
I am using apsx:
<asp:TextBox onClick="DatePicker(this.id);return false;" ID="txtDateApplicationReceived" runat="server"></asp:TextBox>
and have this javascript in the head:
<script type="text/javascript">
function DatePicker(e) {
$(e.toString()).datepick({ yearRange: '-65:+5', showTrigger: '#calImg' });
};
</script>