https://github.com/architrixs/date-time-custom-element
A custom element in HTML that displays the current date and time
https://github.com/architrixs/date-time-custom-element
custom-elements datetime html javascript web-components
Last synced: 8 months ago
JSON representation
A custom element in HTML that displays the current date and time
- Host: GitHub
- URL: https://github.com/architrixs/date-time-custom-element
- Owner: Architrixs
- License: mit
- Created: 2022-12-21T18:23:32.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-07T13:49:42.000Z (over 3 years ago)
- Last Synced: 2024-05-01T18:18:51.771Z (about 2 years ago)
- Topics: custom-elements, datetime, html, javascript, web-components
- Language: TypeScript
- Homepage: https://architrixs.github.io/date-time-custom-element/
- Size: 147 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# <date-time> element
A custom element that displays a date and time.
[Demo](https://architrixs.github.io/date-time-custom-element/examples/index.html)
## Installation
Available on [npm](https://www.npmjs.com/) as [**@architrixs/date-time-element**](https://www.npmjs.com/package/@architrixs/date-time-element).
```
$ npm install --save @architrixs/date-time-element
```
## Usage
### Script
Import as ES modules:
```js
import '@architrixs/date-time-element'
```
Include with a script tag:
```html
```
## Browser support
Browsers without native [custom element support][support] require a [polyfill][].
- Chrome
- Firefox
- Safari
- Microsoft Edge
[support]: https://caniuse.com/custom-elementsv1
[polyfill]: https://github.com/webcomponents/custom-elements
## License
Distributed under the MIT license. See LICENSE for details.