Block typing Textbox field with Calendarextender

Asked

Viewed 221 times

1

Good afternoon, I need to block the typing of the date in a field Textbox Asp.net. It can only receive the date selected in the Xtender application to the Textbox. Would someone have some way via front end to block typing?

inserir a descrição da imagem aqui

1 answer

1


You have some options, you can use the 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);

The Calendarextender keeps running and selecting the date.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.