• Vrushali Pradhan 10
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
I am trying to compare dates  to allow the clone functionality to work. I have following javascript on a custom button but it doesnt work.
var SCAssgn = "{!Quote__c.CreatedDate}"; 
var mydate = new Date(SCAssgn); 
alert(mydate); 
var cutoff = new Date("10/6/2017") 
alert(cutoff) ; 
if(SCAssgn < cutoff ) 

alert("You cannot clone this quote. Please create a new Quote"); 

else { 
cloneQuote(); 
}