{"id":22092205,"url":"https://github.com/pirxpilot/clock","last_synced_at":"2025-07-24T20:32:07.812Z","repository":{"id":57202209,"uuid":"8305208","full_name":"pirxpilot/clock","owner":"pirxpilot","description":"Clock UI component for use in time-picker","archived":false,"fork":false,"pushed_at":"2024-01-30T13:00:24.000Z","size":180,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-13T03:43:10.629Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pirxpilot.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-20T03:25:04.000Z","updated_at":"2022-04-13T09:25:56.000Z","dependencies_parsed_at":"2022-09-17T15:02:07.653Z","dependency_job_id":null,"html_url":"https://github.com/pirxpilot/clock","commit_stats":null,"previous_names":["code42day/clock"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fclock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fclock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fclock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fclock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pirxpilot","download_url":"https://codeload.github.com/pirxpilot/clock/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227476143,"owners_count":17779417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-01T03:08:45.647Z","updated_at":"2024-12-01T03:08:46.439Z","avatar_url":"https://github.com/pirxpilot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM version][npm-image]][npm-url]\n[![Build Status][build-image]][build-url]\n[![Dependency Status][deps-image]][deps-url]\n\n\n# clock\n\n  Clock UI component for use in time-picker\n\n  Click [here](http://pirxpilot.github.io/clock/) to see online demo.\n\n## Installation\n\n    $ npm install --save component-clock\n\n## Example\n\n```js\nconst Clock = require('component-clock');\nconst clock = new Clock();\nclock.el.appendTo('body');\nclock.select({\n\thour: 11,\n\tminute: 30\n});\n```\n\n## Events\n\n  - `change` (time, complete) - when the selected time is modified\n  \t`time` is an object with `hour` and `minute` properties,\n  \t`complete` is true only if both hours and minutes have been clicked by the user\n\n## API\n\n### Clock({ captions })\n\n- `captions` - optional dictionary { hours, minutes, am, pm } - entries will be used by clock to render\ncaptions for Hours, Minutes, AM and PM - `Object` or [`HTMLElement.dataset`][dataset] can be used as a dictionary\n\n### Clock#select(time)\n\nSelect the given `time` ({ hour, minute }).\n\n### Clock#min(minTime)\n\nDefine the minimum time selectable with this clock (inclusive). Time values smaller than `minTime`\nare rendered with `invalid` class. All `change` events are generated only for values larger or equal\nto `minTime`.\n\n### Clock#max(maxTime)\n\nDefine the maximum time selectable with this clock (inclusive). Time values larger than `maxTime`\nare rendered with `invalid` class. All `change` events are generated only for values smaller or equal\nto `maxTime`.\n\n### Clock#type(type)\n\nSet type to `12` to display 12 hour am/pm type of clock. Any other value resets the clock display\nto standard 24 hour display.\n\n## License\n\n  MIT\n\n[dataset]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset\n\n[npm-image]: https://img.shields.io/npm/v/component-clock\n[npm-url]: https://npmjs.org/package/component-clock\n\n[build-url]: https://github.com/pirxpilot/clock/actions/workflows/check.yaml\n[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/clock/check.yaml?branch=main\n\n[deps-image]: https://img.shields.io/librariesio/release/npm/component-clock\n[deps-url]: https://libraries.io/npm/component-clock\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirxpilot%2Fclock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpirxpilot%2Fclock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirxpilot%2Fclock/lists"}