time fields on a follow-up By Field 2 hours after it is created.once we opened after 2 hours it should be in disabled state.and if we opened within 2 hours we can able to see out date our date and time.
Here is My code:
But I cannot able to disable my field
function disableControl()
{
debugger;
var date = new Date();
date.setHours(date.getHours());
//alert(date);
var d1 = new Date();
d1.setHours(d1.getHours()+2);
//alert(d1);
if(date==d1)
{
Xrm.Page.ui.controls.get("fmc_followupby").getDisabled(true);
}
}
Can u plz help me out
Thanks