Disable datetime field in crm 4.0

to disable a crm datetime filed in crm, using Disabled=true is not able to full disable the field.The date text still
enable to edit. To fully disable the date filed use below script
//Disable
crmForm.all.DATETIME.Disabled=true;

var node = crmForm.all["DATETIME" +"img"].parentNode.previousSibling.firstChild;
node.disabled=true;
crmForm.all["DATETIME" + "img"].src = "/_imgs/btn_dis_cal.gif";
node.className = "ro";


//Use below code to enable it


crmForm.all.DATETIME.Disabled =false;
var node = crmForm.all["DATETIME" +"img"].parentNode.previousSibling.firstChild;
node.disabled =false;
crmForm.all["DATETIME" + "img"].src = "/_imgs/btn_dis_cal.gif";node.className = "";

Yorumlar

Bu blogdaki popüler yayınlar

CRM Sayfalarının üzerinde gelen uyarı yazılarını değiştirme

Changing default value of the search criteria of Articles in ms crm

Microsoft Dynamics CRM REAL TİME WORKFLOW (PLUGİN YERİNE KULLANACAĞIZ)