Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

CRM 2011 RU12 date picker/java script issue

$
0
0

Just installed RU12. We have some simple java script on some date picker fields. One example sets the default "time" to 8:00. The script worked greate prior to RU12. Now the date picker is acting up and the year for the date is showing 0113 instead of 2013. If you choose a few different dates it figures out the correct year. Anyone else seen this or found an answer? Here's the java script.

RU12 doesn't like something in this script.

function new_compdate_onchange()
{
var dateField = Xrm.Page.getAttribute("new_compdate");
var currentValue = dateField.getValue();

//If the user changes the date field from null to a valid date, set the
//time portion to 8:00
if ((currentValue != null) && (_previousValue == null)) {

var newDate = new Date(
currentValue.getYear(),
currentValue.getMonth(),
currentValue.getDate(),
8, 00);

dateField.setValue(newDate);
}

Thanks,

Mark


Viewing all articles
Browse latest Browse all 82002

Trending Articles