I have 3 date fields into my list, but I want to disable one of them.
Column name = Fecha
I try to achieve it adding Script Editor like this:
Code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
<script>
var itemID = $(" input[title='Fecha'] ").attr("id");
var itemCode = itemID.substring(0, itemID.indexOf('$'));
$( "[id^=" + itemCode + "] td.ms-dtinput > input[id$='Date']" ).attr('readonly', 'readonly');
$( "[id^=" + itemCode + "] td.ms-dtinput > a" ).attr('onclick','').unbind('click');
$( "[id^=" + itemCode + "] td.ms-dttimeinput > select[id$='DateHours']" ).attr('disabled', 'disabled');
$( "[id^=" + itemCode + "] td.ms-dttimeinput > select[id$='DateMinutes']" ).attr('disabled', 'disabled');
</script>
But it just don´t works, I try to debug it into new item view but I cant see code of script I insert into Script Editor, what is wrong there? Regards
$(document).ready(function{ ..Your code here.. });
then give a try.Uncaught ReferenceError: $ is not defined
like Jquery is not loading @PradipR.