Skip to content

Commit 3330b18

Browse files
authored
fix format update
1 parent 941f35f commit 3330b18

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import handleClick from './handleClick';
99
import buildConfig from './buildConfig';
1010
import './initialize';
1111
import {
12-
getHourFormat,
12+
getHourFormat, getDateFormat,
1313
getHour24,
1414
} from './locale';
1515
import { version } from '../package.json';
@@ -143,7 +143,9 @@ class MiniGraphCard extends LitElement {
143143
else
144144
hour24 = false;
145145
this.config.hour24 = hour24;
146-
this.config.format = getHourFormat(hour24);
146+
const hourFormat = getHourFormat(hour24);
147+
const dateFormat = getDateFormat(this.config);
148+
this.config.format = { ...hourFormat, ...dateFormat };
147149
}
148150
}
149151

0 commit comments

Comments
 (0)