Fix timezone problem for "Today" in the Date Picker. (#14043)

This commit is contained in:
karliemeads 2022-10-13 05:04:28 -04:00 committed by GitHub
parent c478a15846
commit d8be662bd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,8 @@ export class HaDialogDatePicker extends LitElement {
}
private _setToday() {
this._value = new Date().toISOString().split("T")[0];
// en-CA locale used for date format YYYY-MM-DD
this._value = new Date().toLocaleDateString("en-CA");
}
private _setValue() {