An issue in Date format validation in lightning-input type Date: After I changed the input value format according to the latest Salesforce updated ICU locale format for Ireland.
The last column shows the latest format above the last line.
The error I'm getting:
The code that supplies the date value:
JS:
this._DOBLife1 = '30/04/1964';
const dobparts = this._DOBLife1.split('/');
this._DOBLife1 = dobparts[0] + ' ' + 'Apr' + ' ' + dobparts[2];
HTML:
<lightning-input name="life1_DOB" value={_DOBLife1} class="fieldvalidateterm" type="date" label="DOB" variant="label-inline" required ></lightning-input>
Best Answer
Value attribute should be in YYYY-MM-DD format. On view based on locale you can see same date in different formats.
Update js code as below.
Refer this article for more info on dates.