CRM 2011

Hide the future dates in a CRM Calender control through Javascript


Suppose we have a date of birth field “dateofbirth” on the Contact form and we want to hide the future dates than the current date.


create a function eg. myformload() and call this function on the onLoad event of the Contact form. The function myformload() is given below:

function myformload()
document.getElementById(‘dateofbirthimg’).onclick = showmyCalendar;

function showmyCalendar()
var today = new Date();
_dCalMaxDate = today;
InitCalendar(‘d/M/yyyy’, ‘/’, 0, _dCalMinDate, today);
LaunchCalendar(“dateofbirth”), today, 1, false, today, null, 1, today);

I hope this helps.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: