Good afternoon, I need to block typing the date in an asp.net TextBox field. It can only receive the date selected in the calenderExtender component applied to the TextBox. Would anyone have some way via front end to block typing?
You have some options, you can use ReadOnly="true"
<asp:TextBox ID="txtDate" runat="server" ReadOnly="True"></asp:TextBox>
or
txtDate.Attributes.Add("readOnly", "readonly");
or via JQuery
$('#txtDate').attr("readonly", true);
CalendarExtender keeps working and selecting the date.