mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Merge pull request #437 from andyipod1437/develop
Able to turn off and on the date display the clock module.
This commit is contained in:
commit
864e3c7a50
@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Added ability to define "the day after tomorrow" for calendar events (Definition for German and Dutch already included).
|
- Added ability to define "the day after tomorrow" for calendar events (Definition for German and Dutch already included).
|
||||||
- Added CII Badge (we are compliant with the CII Best Practices)
|
- Added CII Badge (we are compliant with the CII Best Practices)
|
||||||
- Add support for doing http basic auth when loading calendars
|
- Add support for doing http basic auth when loading calendars
|
||||||
|
- Add the abilty to turn off and on the date display in the Clock Module
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fix typo in installer.
|
- Fix typo in installer.
|
||||||
|
@ -66,6 +66,13 @@ The following properties can be configured:
|
|||||||
<br><b>Default value:</b> <code>false</code>
|
<br><b>Default value:</b> <code>false</code>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>showDate</code></td>
|
||||||
|
<td>Turn off or on the Date section.<br>
|
||||||
|
<br><b>Possible values:</b> <code>true</code> or <code>false</code>
|
||||||
|
<br><b>Default value:</b> <code>true</code>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>displayType</code></td>
|
<td><code>displayType</code></td>
|
||||||
<td>Display a digital clock, analog clock, or both together.<br>
|
<td>Display a digital clock, analog clock, or both together.<br>
|
||||||
@ -109,4 +116,4 @@ The following properties can be configured:
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
@ -15,6 +15,7 @@ Module.register("clock",{
|
|||||||
showPeriod: true,
|
showPeriod: true,
|
||||||
showPeriodUpper: false,
|
showPeriodUpper: false,
|
||||||
clockBold: false,
|
clockBold: false,
|
||||||
|
showDate: true,
|
||||||
|
|
||||||
/* specific to the analog clock */
|
/* specific to the analog clock */
|
||||||
analogSize: '200px',
|
analogSize: '200px',
|
||||||
@ -85,7 +86,9 @@ Module.register("clock",{
|
|||||||
timeString = moment().format("h:mm");
|
timeString = moment().format("h:mm");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(this.config.showDate){
|
||||||
dateWrapper.innerHTML = moment().format("dddd, LL");
|
dateWrapper.innerHTML = moment().format("dddd, LL");
|
||||||
|
}
|
||||||
timeWrapper.innerHTML = timeString;
|
timeWrapper.innerHTML = timeString;
|
||||||
secondsWrapper.innerHTML = moment().format("ss");
|
secondsWrapper.innerHTML = moment().format("ss");
|
||||||
if (this.config.showPeriodUpper) {
|
if (this.config.showPeriodUpper) {
|
||||||
@ -224,4 +227,4 @@ Module.register("clock",{
|
|||||||
// Return the wrapper to the dom.
|
// Return the wrapper to the dom.
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
});
|
});
|
Loading…
x
Reference in New Issue
Block a user