Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can I disable manual inputs in the text input field- JQuery Datepicker

I have a text box and I can able to find the ID of that textbox. Binded a JQuery date picker to that text box. My requirement is the user can select the values only through Datepicker. User can't enter value manually. Is it possible?

Any help is very ppreciated!

like image 932
user2395176 Avatar asked Dec 07 '22 07:12

user2395176


1 Answers

make the textbox readonly

<input type="text" size="23" id="dateMonthly" readonly="readonly" style="background:white;" />

or via jquery

$('#dateMonthly').attr('readonly', true);
like image 149
Nikola Mitev Avatar answered Jan 25 '23 09:01

Nikola Mitev