Wednesday, 13 October 2021

compare dates in typescript

 compare two dates 

    var date=new Date().toLocaleDateString();
var date2=new Date(this.invoiceOject.invoiceDate ).toLocaleDateString();
if(date==date2){
  this.toastr.error(
    "Unable to delete,invoiceDate is not same as Today's date",    "CASH INVOICE",     { timeOut: 4000 }
  );
  return;
}


var let main difference is let dont work inside scope only not wokr outside

{let x= hello all}
you cannot call x outside only possible with var

No comments:

Post a Comment

7 Common mistakes in Dot Net — You can avoid

  There are many common mistakes made during .NET (ASP.NET, .NET Core) development, which affect performance, security, and code… Code Crack...