<SharePoint:DateTimeControl Enabled="false" runat="server" ID="dtSummaryDate
" DateOnly="true" />
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
<script language="javascript" type="text/javascript">
_spBodyOnLoadFunctionNames.push("ReadOnlyTexbox");
function ReadOnlyTexbox()
{
var x = document.getElementsByTagName("INPUT");
alert(x.length);
for (var i = 0; i
< x.length; i++) {
if (x(i).id.indexOf("dtSummaryDate") > 0) {
// alert(x(i));
//x(i).disabled = 'disabled';
x(i).setAttribute('readonly', 'readonly');
}
}
}
</script>
Thanks Surya,
ReplyDeleteFor sharing this code,it work for me.