{"id":15975766,"url":"https://github.com/MHzarini/ngx-time-duration-picker","last_synced_at":"2025-10-20T15:31:28.012Z","repository":{"id":18539828,"uuid":"84559071","full_name":"MHzarini/ngx-time-duration-picker","owner":"MHzarini","description":"A generic time duration picker Angular component (v2+)","archived":false,"fork":false,"pushed_at":"2023-01-07T04:24:38.000Z","size":2349,"stargazers_count":2,"open_issues_count":27,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-29T16:42:10.196Z","etag":null,"topics":["angular","angular-2","angular2","bootstrap","daterange","duration","duration-picker","picker","timepicker","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MHzarini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-10T12:44:28.000Z","updated_at":"2021-10-04T16:31:57.000Z","dependencies_parsed_at":"2023-01-14T07:46:03.858Z","dependency_job_id":null,"html_url":"https://github.com/MHzarini/ngx-time-duration-picker","commit_stats":null,"previous_names":["mhzarini/angular2-time-duration-picker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MHzarini%2Fngx-time-duration-picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MHzarini%2Fngx-time-duration-picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MHzarini%2Fngx-time-duration-picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MHzarini%2Fngx-time-duration-picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MHzarini","download_url":"https://codeload.github.com/MHzarini/ngx-time-duration-picker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237358346,"owners_count":19297058,"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":["angular","angular-2","angular2","bootstrap","daterange","duration","duration-picker","picker","timepicker","typescript"],"created_at":"2024-10-07T22:04:57.076Z","updated_at":"2025-10-20T15:31:27.557Z","avatar_url":"https://github.com/MHzarini.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/angular2-time-duration-picker.svg)](https://badge.fury.io/js/angular2-time-duration-picker)\n# ngx-time-duration-picker\n\nA generic time duration picker Angular component (v. 2.0.0+)\n\n\n![](https://raw.githubusercontent.com/MHzarini/angular2-time-duration-picker/master/docs/img/example.png)\n\n## Installation\n\nTo install this library, run:\n\n```bash\n$ npm install ngx-time-duration-picker --save\n```\n\n## Requirements ##\n* [Angular](https://angular.io) [![npm version](https://badge.fury.io/js/%40angular%2Fcore.svg)](https://badge.fury.io/js/%40angular%2Fcore)\n\n## usage ##\nImport the NgxTimeDurationPickerModule in your `app.module` and add it to the imports array.\nYou need to import the Angular FormsModule and ReactiveFormsModule as well.\nand then from your Angular `AppModule`:\n\n```typescript\nimport { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\n\nimport { AppComponent } from './app.component';\n\n// Import the library\nimport { NgxTimeDurationPickerModule } from 'angular2-time-duration-picker';\n\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [\n    BrowserModule,\n    ...\n    NgxTimeDurationPickerModule\n  ],\n  providers: [],\n  bootstrap: [AppComponent]\n})\nexport class AppModule { }\n```\n\nOnce your library is imported, you can use its components in your Angular application:\n\nAdd the `ngx-time-duration-picker` component to the page where you want to use the picker, with disired Time unit `ngx-time-duration-picker-unit`.\n```html\n\u003ctime-duration-picker [inputDisabled]=false returnedValueUnit=\"second\" (onChange)=\"onNumberChanged($event)\" class=\"row\"\u003e\n  \u003ctime-duration-picker-unit class=\"col-md-12\" [name]=\"'second'\"\u003e\u003c/time-duration-picker-unit\u003e\n\u003c/time-duration-picker\u003e\n\n```\n```html\n\u003cngx-time-duration-picker returnedValueUnit=\"hour\" (OnChange)=\"onValueChanged($event)\"\u003e\n  \u003cngx-time-duration-picker-unit name=\"millisecond\" min=\"0\" max=\"999\" step=\"1\"\u003e\u003c/ngx-time-duration-picker-unit\u003e\n  \u003cngx-time-duration-picker-unit name=\"second\" min=\"0\" max=\"60\" step=\"1\"\u003e\u003c/ngx-time-duration-picker-unit\u003e\n  \u003cngx-time-duration-picker-unit name=\"minute\" min=\"0\" max=\"60\" step=\"1\"\u003e\u003c/ngx-time-duration-picker-unit\u003e\n  \u003cngx-time-duration-picker-unit name=\"hour\" min=\"0\" max=\"60\" step=\"1\"\u003e\u003c/ngx-time-duration-picker-unit\u003e\n  \u003cngx-time-duration-picker-unit name=\"day\" min=\"0\" max=\"60\" step=\"1\"\u003e\u003c/ngx-time-duration-picker-unit\u003e\n  \u003cngx-time-duration-picker-unit name=\"week\" min=\"0\" max=\"60\" step=\"1\"\u003e\u003c/ngx-time-duration-picker-unit\u003e\n\u003c/ngx-time-duration-picker\u003e\n\n```\n## `time-duration-picker` Field Schema\n| Attribute        | Type           | Required  | Description |\n| :------------- |:-------------| :-----:| :-----|\n| returnedValueUnit | [input] String | No | The unit of returned Value. default: `'second'` |\n| inputDisabled | [input] Boolean | No | Defines if the input input should be disabled / editable by the user. default: `true` |\n| OnChange | (output) Number | No | The onChange event of the component. Emits the value of the picker every time the user has clicked the - or + button. |\n## `time-duration-picker-unit` Field Schema\n| Attribute        | Type           | Required  | Description |\n| :------------- |:-------------| :-----:| :-----|\n| name | [input] String | Yes | The units of the picker, supported values: `'week'`, `'day'`, `'hour'`, `'minute'`, `'second'` and `'millisecond'` |\n| label | [input] String | No | The label of the picker, default: name capitalized |\n| min | [input] number | No | The Minimum value can be set, default: 0 |\n| max | [input] number | No | The Maximum value can be set, default: (check the code) |\n| step | [input] number | No | The step value, default: 1 |\n| inputDisabled | [input] Boolean | No | Defines if the input input should be disabled / editable by the user. default: `true` |\n| OnChange | (output) Number | No | The onChange event of the component. Emits the value of the picker every time the user has clicked the - or + button. |\n\n## License\n\nMIT © [Mohammad Nuairat](mailto:mhn.zarini@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMHzarini%2Fngx-time-duration-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMHzarini%2Fngx-time-duration-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMHzarini%2Fngx-time-duration-picker/lists"}