{"id":22106988,"url":"https://github.com/legitcode/scheduler","last_synced_at":"2025-10-11T14:38:14.629Z","repository":{"id":51799051,"uuid":"42034697","full_name":"Legitcode/scheduler","owner":"Legitcode","description":"A pure React implementation of a drag and drop scheduler","archived":false,"fork":false,"pushed_at":"2018-01-23T15:25:52.000Z","size":2567,"stargazers_count":115,"open_issues_count":10,"forks_count":23,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-25T09:43:43.987Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://legitcode.github.com/scheduler","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/Legitcode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-07T06:13:56.000Z","updated_at":"2023-12-08T13:40:38.000Z","dependencies_parsed_at":"2022-08-22T21:41:03.830Z","dependency_job_id":null,"html_url":"https://github.com/Legitcode/scheduler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legitcode%2Fscheduler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legitcode%2Fscheduler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legitcode%2Fscheduler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legitcode%2Fscheduler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Legitcode","download_url":"https://codeload.github.com/Legitcode/scheduler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227515121,"owners_count":17782642,"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-01T08:13:29.355Z","updated_at":"2025-10-11T14:38:09.596Z","avatar_url":"https://github.com/Legitcode.png","language":"JavaScript","readme":"[![Codetree](https://codetree.com/images/managed-with-codetree.svg)](https://codetree.com/projects/Q6Rz)\n\n# Legit Scheduler\nA pure React implementation of a drag and drop scheduler\n\n## Usage\n\nInstall it:\n```bash\n$ npm install --save legit-scheduler\n```\n\nImport it:\n```js\nimport Scheduler from 'legit-scheduler'\n```\n\nThe scheduler component has three required props:\n`events`    - An array of event objects\n`resources` - An array of resources\n`width`     - The width of the scheduler container, in pixels. An integer.\n\nThe resources array is just strings:\n```\n['Resource 1', 'Resource 2', 'Resource 3']\n```\n\nThe events array is an array of objects:\n```\n{\n  title: 'A great event',  // Required: The title of the event\n  startDate: '2016-01-24', // Required: The start date, must be in the format of \"YYYY-MM-DD\"\n  duration: 4,             // Required: The duration of the event in days\n  resource: 'Resource 1',  // Required: The name of the resource the event belongs to. Must match the resource name from the resources prop\n  id: '3829-fds89',        // Required: A unique identifier. This can be anything you want as long as it's unique\n  disabled: false,         // Optional: Whether or not this event can be moved (it can still be resized). Defaults to false.\n  styles: {}               // Optional: An object of styles to apply to the event object\n}\n```\n\nThe scheduler component also takes more optional props:\n\n`onEventChanged` - A call back that is fired when the event is moved. It receives an object containing the new event props  \n`onEventResized` - A call back that is fired when the event is resized. It receives an object containing the new event props  \n`onEventClicked` - A call back that is fired when the event is clicked. It receives an object containing the event props  \n`onCellClicked`  - A call back that is fired when an empty cell on the scheduler is clicked. It receives the date and resource name as props  \n`onRangeChanged` - A call back that is fired when the date range is changed. It receives a `DateRange` object with the new range.  \n`from` - Either a date string or a `RangeDate` object defining the start date for the range.\n`to` - Either a date string or a `RangeDate` object defining the end date for the range.\n\n## Development\n```bash\n$ npm install\n$ npm run example\n```\n\nVisit: `localhost:8080/example`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegitcode%2Fscheduler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flegitcode%2Fscheduler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegitcode%2Fscheduler/lists"}