在onchange事件中给 日期 属性 赋值吗?
如果是,请参考:
Example
The following code example shows how to use a field of type DateTime.
var oDate;
var oToday;
oDate = crmForm.all.scheduledend.DataValue;
if (oDate == null) {
oDate = new Date();
}
oToday = new Date();
oDate = oToday;
oDate = oDate.setHours(17,0,0);
if (oDate.TimeVisible)
{
alert("The time is visible.");
}
else
{
alert("Only the date is visible; the time is hidden.");
}
crmForm.all.scheduledend.DataValue = oDate;
Batistuta Cai-刀客 | 蔡敏生 | MS CRM MVP | Blog:http://caims.cnblogs.com