mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Bug fix: adding date to the analog clock if showDate is true (#3101)
Adding date to the clock module when displayType is "analog" and "showDate" is true. The setting in analogShowDate is respected. Fixes #3100 --------- Co-authored-by: Michael Teeuw <michael@xonaymedia.nl> Co-authored-by: Veeck <github@veeck.de>
This commit is contained in:
committed by
GitHub
parent
432d900ecd
commit
babd22b04f
@@ -281,9 +281,14 @@ Module.register("clock", {
|
||||
*/
|
||||
if (this.config.displayType === "analog") {
|
||||
// Display only an analog clock
|
||||
if (this.config.analogShowDate === "top") {
|
||||
if (this.config.showDate) {
|
||||
// Add date to the analog clock
|
||||
dateWrapper.innerHTML = now.format(this.config.dateFormat);
|
||||
wrapper.appendChild(dateWrapper);
|
||||
}
|
||||
if (this.config.analogShowDate === "bottom") {
|
||||
wrapper.classList.add("clock-grid-bottom");
|
||||
} else if (this.config.analogShowDate === "bottom") {
|
||||
} else if (this.config.analogShowDate === "top") {
|
||||
wrapper.classList.add("clock-grid-top");
|
||||
}
|
||||
wrapper.appendChild(analogWrapper);
|
||||
|
Reference in New Issue
Block a user