{"id":25049148,"url":"https://github.com/waqaskhanroghani/react-schedule-availability","last_synced_at":"2026-04-05T23:34:42.021Z","repository":{"id":275841477,"uuid":"927367272","full_name":"waqaskhanroghani/react-schedule-availability","owner":"waqaskhanroghani","description":"A modern React component for managing weekly availability schedules.","archived":false,"fork":false,"pushed_at":"2025-02-04T20:59:32.000Z","size":227,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T03:32:20.852Z","etag":null,"topics":["availability","availability-checker","calendar","nextjs","react","scheduler","time-picker"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-schedule-availability","language":"TypeScript","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/waqaskhanroghani.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-04T20:52:09.000Z","updated_at":"2025-02-05T07:24:16.000Z","dependencies_parsed_at":"2025-02-04T21:37:53.765Z","dependency_job_id":"0f2591da-4b05-4407-9cf9-d3b8e1d9a849","html_url":"https://github.com/waqaskhanroghani/react-schedule-availability","commit_stats":null,"previous_names":["waqaskhanroghani/react-schedule-availability"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/waqaskhanroghani/react-schedule-availability","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waqaskhanroghani%2Freact-schedule-availability","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waqaskhanroghani%2Freact-schedule-availability/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waqaskhanroghani%2Freact-schedule-availability/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waqaskhanroghani%2Freact-schedule-availability/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waqaskhanroghani","download_url":"https://codeload.github.com/waqaskhanroghani/react-schedule-availability/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waqaskhanroghani%2Freact-schedule-availability/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31454199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"ssl_error","status_checked_at":"2026-04-05T21:22:51.943Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["availability","availability-checker","calendar","nextjs","react","scheduler","time-picker"],"created_at":"2025-02-06T08:16:42.593Z","updated_at":"2026-04-05T23:34:41.988Z","avatar_url":"https://github.com/waqaskhanroghani.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Schedule Availability\n\nA modern React component for managing weekly availability schedules.\n\n## Installation\n\n```bash\nnpm install react-schedule-availability\n# or\nyarn add react-schedule-availability\n```\n\n## Quick Start Templates\n\n### For Next.js (App Router)\n```tsx\n'use client';\nimport { AvailabilityPicker } from 'react-schedule-availability';\nimport 'react-schedule-availability/styles.css';\n\nexport default function Page() {\n  const [schedule, setSchedule] = useState({\n    monday: {\n      isOpen: true,\n      isAllDay: false,\n      intervals: [{ start: \"09:00\", end: \"17:00\" }]\n    },\n    // ... other days\n  });\n\n  return (\n    \u003cAvailabilityPicker\n      value={schedule}\n      onChange={setSchedule}\n      timeStep={30}\n    /\u003e\n  );\n}\n```\n\n### For React\n```tsx\nimport { AvailabilityPicker } from 'react-schedule-availability';\nimport 'react-schedule-availability/styles.css';\n\nfunction ScheduleManager() {\n  const [schedule, setSchedule] = useState({\n    monday: {\n      isOpen: true,\n      isAllDay: false,\n      intervals: [{ start: \"09:00\", end: \"17:00\" }]\n    },\n    // ... other days\n  });\n\n  return (\n    \u003cAvailabilityPicker\n      value={schedule}\n      onChange={setSchedule}\n      timeStep={30}\n    /\u003e\n  );\n}\n```\n\n## Ready-to-Use Templates\n\nWe provide complete, styled templates for both React and Next.js:\n\n1. **React Template**: Copy from `/templates/ReactTemplate.tsx`\n   - Basic setup with TypeScript\n   - Clean, modern UI\n   - State management example\n   - Schedule display\n\n2. **Next.js Template**: Copy from `/templates/NextTemplate.tsx`\n   - App Router compatible\n   - Tailwind CSS styling\n   - Custom animations\n   - Schedule display\n\n## Props\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `value` | `WeeklySchedule` | Required | Current schedule |\n| `onChange` | `(schedule: WeeklySchedule) =\u003e void` | Required | Change handler |\n| `timeStep` | `number` | `30` | Interval in minutes |\n| `minTime` | `string` | `\"00:00\"` | Start time (24h) |\n| `maxTime` | `string` | `\"23:30\"` | End time (24h) |\n| `disabled` | `boolean` | `false` | Disable picker |\n| `className` | `string` | `\"\"` | Custom CSS class |\n\n## Types\n\n```typescript\ntype WeeklySchedule = {\n  [key in DayOfWeek]: {\n    isOpen: boolean;\n    isAllDay: boolean;\n    intervals: Array\u003c{ start: string; end: string; }\u003e;\n  };\n};\n```\n\n## Styling\n\n1. **Default Style**\n```tsx\nimport 'react-schedule-availability/styles.css';\n```\n\n2. **Custom Styling**\n```css\n.availability-picker {\n  /* Your styles */\n}\n```\n\n## Examples\n\n### Custom Time Range\n```tsx\n\u003cAvailabilityPicker\n  value={schedule}\n  onChange={setSchedule}\n  minTime=\"06:00\"\n  maxTime=\"22:00\"\n  timeStep={15}\n/\u003e\n```\n\n### With Form\n```tsx\n\u003cform onSubmit={handleSubmit}\u003e\n  \u003cAvailabilityPicker\n    value={formData.schedule}\n    onChange={schedule =\u003e setFormData({ ...formData, schedule })}\n  /\u003e\n  \u003cbutton type=\"submit\"\u003eSave\u003c/button\u003e\n\u003c/form\u003e\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaqaskhanroghani%2Freact-schedule-availability","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaqaskhanroghani%2Freact-schedule-availability","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaqaskhanroghani%2Freact-schedule-availability/lists"}