{"id":17319133,"url":"https://github.com/naomiaro/timepoint-selection","last_synced_at":"2025-07-11T16:10:40.080Z","repository":{"id":57377181,"uuid":"58801156","full_name":"naomiaro/timepoint-selection","owner":"naomiaro","description":"Key controlled time duration and validation including rollover for html form input with javascript.","archived":false,"fork":false,"pushed_at":"2018-02-24T16:52:20.000Z","size":731,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T04:13:19.186Z","etag":null,"topics":["duration","input","time"],"latest_commit_sha":null,"homepage":"http://naomiaro.github.io/timepoint-selection/","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/naomiaro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-14T09:59:26.000Z","updated_at":"2023-08-03T12:50:56.000Z","dependencies_parsed_at":"2022-09-26T16:41:44.364Z","dependency_job_id":null,"html_url":"https://github.com/naomiaro/timepoint-selection","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naomiaro%2Ftimepoint-selection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naomiaro%2Ftimepoint-selection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naomiaro%2Ftimepoint-selection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naomiaro%2Ftimepoint-selection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naomiaro","download_url":"https://codeload.github.com/naomiaro/timepoint-selection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248648155,"owners_count":21139236,"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":["duration","input","time"],"created_at":"2024-10-15T13:22:33.777Z","updated_at":"2025-04-14T15:23:15.388Z","avatar_url":"https://github.com/naomiaro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#timepoint-selection\n\n[![npm](https://img.shields.io/npm/dm/timepoint-selection.svg)](https://www.npmjs.com/package/timepoint-selection)\n\n**Enhance input elements with easy key entry and validation for time durations**. Library is in pure javascript, no framework is needed. Event handlers are added directly to the input and the package includes a destroy method to remove all added events.\n* Input numbers directly or increment and decrement with up and down arrow keys.\n* Left and right arrow keys navigate through the input selecting the next important character for entry.\n* Rollover is automatically handled.\n* Tabbing into an element automatically selects the first character in the input for easier entry.\n* Non-valid characters are prevented from input.\n\n![Screenshot](pic.png?raw=true \"23:59:59 limited selection\")\n\n![Screenshot](pic2.png?raw=true \"Setting separators\")\n\n## Installation\n\n  `npm install timepoint-selection`\n\n## Basic Usage\n\n```javascript\nvar selection = require('timepoint-selection');\n\nvar timepoint = selection(document.getElementById(\"input\"), {\n    'durationFormat': 'hh:mm:ss',\n    'max': 3600 * 24,               // point of rollover in seconds.\n    'value': 0,                     // initial value of input in seconds.\n    'useAbbr': true,                // configure the separator to not be ':'\n    'abbr': {                       // pass in custom separator (with trailing space if desired)\n      'dd': 'days ',\n      'hh': 'h ',\n      'mm': 'm ',\n      'ss': 's'\n    }\n});\n\n//returns the current value of the input in seconds.\ntimepoint.getValue();\n\n//sets the current value of the input in seconds.\ntimepoint.setValue(seconds);\n\n//remove all the event listeners from the input.\ntimepoint.destroy();\n```\n\nAccepted duration formats:\n- 'dd:hh:mm:ss'\n- 'dd:hh:mm'\n- 'hh:mm:ss'\n- 'hh:mm'\n- 'mm:ss'\n\nd = days, h = hours, m = minutes, s = seconds\n\n## Examples\n\n[Demo site](http://naomiaro.github.io/timepoint-selection/)\n\n## Development\n\n  `npm run start` runs the webpack dev server.\n\n## License\n\n[MIT License](http://doge.mit-license.org)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaomiaro%2Ftimepoint-selection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaomiaro%2Ftimepoint-selection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaomiaro%2Ftimepoint-selection/lists"}