I want to use jQuery for my Textbox. I want use the Datepicker with the format yyyy-mm-dd and with an Icon.
<script>
$( "#txtVon" ).datepicker({
showOn: "button",
buttonImage: "images/calendar.gif",
buttonImageOnly: true
});
</script>
<asp:TextBox ID="txtVon" runat="server"></asp:TextBox>
How can I do this?
When using ASP.NET WebForms you are best to use classes instead of IDs when referring to elements, because the rendered ID will be different:
<script>
$(".txtVon").datepicker({
showOn: "button",
buttonImage: "images/calendar.gif",
buttonImageOnly: true
});
</script>
<asp:TextBox ID="txtVon" runat="server" class="txtVon"></asp:TextBox>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With