# j-Clock

> j-Clock: supports dark mode; works only with Bootstrap Grid System (otherwise is need to fix CSS)

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: 7ff4602d1f067cc7944921c979b37dd2d36bf9647f61a86122b3ac1b43e4c87f
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

- supports __dark mode__
- works __only__ with Bootstrap Grid System (otherwise is need to fix CSS)
- thanks [weareoutman](https://github.com/weareoutman/) for some things

__Configuration__:

- `twelvehour` {Boolean} (optional) the clock will be 12-hour (default `false`).

## Usage

```javascript
var ELEMENT = $(document);
var PATH = 'some.path.to.date';
var X_OFFSET = 100;

SETTER('clock', 'toggle', ELEMENT, PATH, function(date) {
	console.log('SELECTED DATE:', date);
}, X_OFFSET);
```

Use it with `<ui-component name="clock">`. When the component is not loaded yet, jComponent downloads it on first use from the address in `DEF.fallback` (the Componentator CDN by default). Author: Denis Granec. Source: the Componentator components repository, MIT license.

```html example.html
<a href="#clock">SHOW CLOCK</a>
<ui-component name="clock"></ui-component>

<script>
	var form = {};
	form.date = new Date();

	$('a[href="#clock"]').on('click', function(e) {
		SETTER('clock', 'toggle', $(this), form.date, function(date) {
			alert(date);
		});
	});
</script>
```
