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