I have several appointment forms setup with Sundays, previous dates and the current date grayed out. The problem is, if a user selects tomorrow as a date for their appointment, they can simply go back and manually edit the date to today’s date.
Is there any way to allow the date picker to choose the date, but make the field not directly editable?





September 24, 2012 at 9:27 am
This can be done by adding a bit of javascript somewhere (your theme javascript file, your customizable HTML....).
<script type="text/javascript">jQuery(document).ready(function($){$(".frm_date").keypress(function(e){e.preventDefault();}); })</script>September 24, 2012 at 9:30 am
Will this translate well to browsers/devices with javascript blocked or not loaded?
September 24, 2012 at 9:33 am
The datepicker is created with javascript, so if javascript doesn't work you don't want to prevent the use of the field anyway.
September 24, 2012 at 9:47 am
Thank you! That worked perfectly.
Topic closed.