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

adding a decimal number for a date

$
0
0

Hi, 

I have a field "Start Date" date type = "Notice period" field Date type + "Duration in month" decimal type  

its working and setting the date correct if the Duration in month i'm adding is whole "for example 3 " but if " 3.5  " it  consider it as 3 months and setting wrong

any suggestion? 

function SetStartDate() 
{
   debugger;
   var Notice = Xrm.Page.getAttribute("new_notice").getValue();
   var Duration=Xrm.Page.getAttribute("new_durationinmonth").getValue();

   if(Notice != null && Notice != "" &&Duration != null && Duration != "" )
   {
 
     Notice.setMonth(Notice.getMonth() + Duration); 

   Xrm.Page.getAttribute("new_startdate").setValue(Notice);
     Xrm.Page.getAttribute("new_startdate").setSubmitMode("always");

     
   }

}

Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images