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

API run block issue run api from cmd

  ✅ Debug Checklist – “Access is Denied” (.NET / Visual Studio) 🔹 Identify Problem ☐ Error: Unable to start program (.exe) – Access is deni...