Directory

← Back

digital-clock

A simple digital-clock component

Author

Rating

Popularity

<100

[ This description is mirrored from README.md at github.com/telecomsante/digital-clock on 2019-05-10 ]

<digital-clock>

Published on webcomponents.org

A simple clock component, displaying the current date and time into the local format.

It's possible to set an alarm.

Quick example

<digital-clock></digital-clock>
<audio src="demo/Zen_Temple_Bell.mp3" id="alarm"></audio>
<script>
const clock = document.querySelector('digital-clock');
let now = new Date();
now.setMinutes(now.getMinutes() + 1);
now.setSeconds(0);

clock.alarm = now.toISOString();
clock.addEventListener('clock-alarm', () => {
  document.getElementById("alarm").play();
});
</script>

The component is licensed under the ISC License

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Dependencies

Polymer/polymer#^2.0.0

  • PolymerElements/iron-icon#^2.0.1
  • PolymerElements/iron-iconset-svg#^2.0.1
Released
2017-10-10
Maturity
TESTED
License
Other

Compatibility

Framework
Polymer 2.0+
Polymer 1.0+ in 1.0.2
Browser
Browser Independent

digital-clock - Vaadin Add-on Directory

A simple digital-clock component digital-clock - Vaadin Add-on Directory
**[ This description is mirrored from README.md at [github.com/telecomsante/digital-clock](https://github.com//telecomsante/digital-clock/blob/v2.0.0/README.md) on 2019-05-10 ]** # \ [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/telecomsante/digital-clock) A simple clock component, displaying the current date and time into the local format. It's possible to set an alarm. ![](digital-clock.png) ## Quick example ```html ``` The component is licensed under the [ISC License](LICENSE.md)
GitHub Homepage
Issue tracker
View on GitHub
License
Online Demo
Documentation

digital-clock version 1.0.0
### Dependencies Polymer/polymer#^1.4.0 * PolymerElements/iron-icon#^1.0.12 * PolymerElements/iron-icons#^1.2.0

digital-clock version 1.0.1
### Dependencies Polymer/polymer#^1.4.0 * PolymerElements/iron-icon#^1.0.12

digital-clock version 1.0.2
### Dependencies Polymer/polymer#^1.4.0 * PolymerElements/iron-icon#^1.0.12

digital-clock version 2.0.0
### Dependencies Polymer/polymer#^2.0.0 * PolymerElements/iron-icon#^2.0.1 * PolymerElements/iron-iconset-svg#^2.0.1

Online