Prevent form field to be edited without disabling field

Posted by Erick on Stack Overflow See other posts from Stack Overflow or by Erick
Published on 2010-04-06T15:19:17Z Indexed on 2010/04/06 15:23 UTC
Read the original article Hit count: 607

I am currently working on a page that has a date picker for one of the field.

One of the requirements by my client is to prevent the user from editing the field manually. Only the date picker would be possible to be used. (jQuery DatePicker)

I had in mind to disable the field and use an hidden field to store the data (disabled from object ton send data on post). This sounds a bit wacky for something that could be done by javascript I'm pretty sure.

So the big question, in javascript is it possible to prevent manual edition of a field without stopping datepicker plugin?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html