How to set Read Only or Disable Date Time Control in SharePoint 2010 Using Jquery

Set read only or disable date Time control in sharePoint 2010 (Client side) using Jquery:

Open your list in sharepoint designer and add fallowing lines of code on newForm.aspx or EditForm.aspx page of your list.

  1. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>    <script type="text/javascript">   $(function() {   $( "td.ms-dtinput > input[id$='DateTimeFieldDate']" ).attr('readonly''readonly');    $( "td.ms-dtinput > a" ).attr('onclick','').unbind('click');   });   </script>  
Result: Your calendar control will be set as red only.

project list