{"id":16719536,"url":"https://github.com/koss-lebedev/bootstrap-duration-picker","last_synced_at":"2025-10-01T06:30:50.470Z","repository":{"id":56098179,"uuid":"47104097","full_name":"koss-lebedev/bootstrap-duration-picker","owner":"koss-lebedev","description":"Bootstrap Duration picker","archived":false,"fork":false,"pushed_at":"2020-11-25T14:03:24.000Z","size":85,"stargazers_count":29,"open_issues_count":6,"forks_count":28,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-19T02:43:28.443Z","etag":null,"topics":["bootstrap","bootstrap-duration-picker","duration","plugin"],"latest_commit_sha":null,"homepage":"https://github.com/koss-lebedev/bootstrap-duration-picker","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/koss-lebedev.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":"2015-11-30T08:07:38.000Z","updated_at":"2024-07-02T05:07:56.000Z","dependencies_parsed_at":"2022-08-15T13:10:22.290Z","dependency_job_id":null,"html_url":"https://github.com/koss-lebedev/bootstrap-duration-picker","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koss-lebedev%2Fbootstrap-duration-picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koss-lebedev%2Fbootstrap-duration-picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koss-lebedev%2Fbootstrap-duration-picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koss-lebedev%2Fbootstrap-duration-picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koss-lebedev","download_url":"https://codeload.github.com/koss-lebedev/bootstrap-duration-picker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234832661,"owners_count":18893879,"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":["bootstrap","bootstrap-duration-picker","duration","plugin"],"created_at":"2024-10-12T21:43:36.474Z","updated_at":"2025-10-01T06:30:45.205Z","avatar_url":"https://github.com/koss-lebedev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bootstrap-duration-picker\n\nJavascript library for selecting duration. Target input to which plugin is applied will contain duration in seconds.\n\n[![Code Climate](https://codeclimate.com/github/koss-lebedev/bootstrap-duration-picker/badges/gpa.svg)](https://codeclimate.com/github/koss-lebedev/bootstrap-duration-picker)\n[![npm version](https://badge.fury.io/js/bootstrap-duration-picker.svg)](https://badge.fury.io/js/bootstrap-duration-picker)\n[![Bower version](https://badge.fury.io/bo/bootstrap-duration-picker.svg)](https://badge.fury.io/bo/bootstrap-duration-picker)\n\n## Installation\n\nUsing Bower:\n\n    bower install bootstrap-duration-picker\n\nUsing NPM:\n\n    npm install bootstrap-duration-picker\n\nOr simply copy `bootstrap-duration-picker.css` and `bootstrap-duration-picker.js` files to your project.\n\n## Example\n\n![Bootstrap-Duration-Picker](demo.png)\n\n## Dependencies\n\n- jQuery 1.*\n- Bootstrap 3.* (for styling only)\n\n## Usage\n\n```js\n$('.duration-picker').durationPicker();\n\n// or\n\n$('.duration-picker').durationPicker({\n    \n    // optional object with translations (English is used by default)\n    translations: {\n        day: 'dia',\n        hour: 'hora',\n        minute: 'minuto',\n        second: 'segundo',\n        days: 'dias',\n        hours: 'horas',\n        minutes: 'minutos',\n        seconds: 'segundos',\n    },\n\n    // defines whether to show seconds or not\n    showSeconds: false,\n\n    // defines whether to show days or not\n    showDays: true,\n\n    // callback function that triggers every time duration is changed \n    //   value - duration in seconds\n    //   isInitializing - bool value\n    onChanged: function (value, isInitializing) {\n        \n        // isInitializing will be `true` when the plugin is initialized for the\n        // first time or when it's re-initialized by calling `setValue` method\n        console.log(value, isInitializing);\n    }\n});\n```\n\n## Public methods\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eMethod\u003c/th\u003e\n    \u003cth\u003eExample\u003c/th\u003e\n    \u003cth\u003eDescription\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cb\u003esetValue\u003c/b\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003e$('#selector').data('durationPicker').setValue(0);\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eAllows to reinitialize duration picker value after it's been created. Accepts new number of seconds\u003c/td\u003e\n  \u003c/tr\u003e  \n  \u003ctr\u003e\n      \u003ctd\u003e\u003cb\u003edestroy\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003e$('#selector').data('durationPicker').destroy();\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003eDestroys the plugin, reverting any DOM changes made by the plugin\u003c/td\u003e\n    \u003c/tr\u003e \n\u003c/table\u003e\n\n## License\n\nPlease see [LICENSE](LICENSE) for licensing details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoss-lebedev%2Fbootstrap-duration-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoss-lebedev%2Fbootstrap-duration-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoss-lebedev%2Fbootstrap-duration-picker/lists"}