Q:

How to get the Today Date (Only Date not DateTime) and Current Year End Date in JavaScript LWC Salesforce

I want to display default date values to Lightning-Input, how to get the Today Date and Current year date in Javascript.
Format should be :- May 15, 2020

A:

The following can get you current date
JS
connectedCallback(){
    var today = new Date();
    this.date=today.toISOString();
    console.log(today.toISOString())
    var last=new Date(new Date().getFullYear(), 11, 32);
    this.date1=last.toISOString();
}

here is a PG https://developer.salesforce.com/docs/component-library/tools/playground/9NLbuG8pA/3/edit

