How to use jscript to add a date field to a form in Microsoft Dynamics CRM 2011
You cannot just put a jscript date object into a date field on a form. You need to pass a numeric value, dateVal represents the number of milliseconds in Coordinated Universal Time between the specified date and midnight January 1, 1970 to the control.
function sendtocrm1()
{
var today1 = new Date();
var MyDateMS = Date.UTC(today1.getYear(),today1.getMonth(),today1.getDate());
window.top.opener.Xrm.Page.getAttribute("new_birthdate").setValue(MyDateMS);
}
Best Regards
Dynamics CRM Team