Can I create a text box where the user can not type in the text box?


I want to know is there a way in html where the (text box) can be made so that the user can not type in anything in the text box? I have a text box where if you click on it, it displays the datepicker jquery, if a date is chosen then the date is displayed in the text box. So really if a date can be chosen using the datepicker, there is no need for the user to type in the date manually (entering a date manually can lead to human error). So is there a way this can be done?

(This is a new question)

You can try putting the "readonly" attribute on your text field

<input type="text" READONLY id="my-date-field"/>