{"id":15011766,"url":"https://github.com/preachjs/datepicker","last_synced_at":"2025-04-12T03:31:43.465Z","repository":{"id":229601993,"uuid":"773694799","full_name":"preachjs/datepicker","owner":"preachjs","description":"Headless Datepicker(s) for preact","archived":false,"fork":false,"pushed_at":"2024-12-20T07:58:34.000Z","size":478,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T23:34:47.616Z","etag":null,"topics":["component","datepicker","headless","preact","ui","unstyled"],"latest_commit_sha":null,"homepage":"https://preachjs.github.io/datepicker/","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/preachjs.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2024-03-18T08:27:46.000Z","updated_at":"2025-03-05T02:24:30.000Z","dependencies_parsed_at":"2024-03-25T11:28:41.615Z","dependency_job_id":"b5fc906a-7afc-4e6d-b52e-ae75646320bd","html_url":"https://github.com/preachjs/datepicker","commit_stats":{"total_commits":42,"total_committers":2,"mean_commits":21.0,"dds":"0.023809523809523836","last_synced_commit":"f02c6354f1842f01ed5c9e3883a996c72920cdd9"},"previous_names":["preachjs/datepicker"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preachjs%2Fdatepicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preachjs%2Fdatepicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preachjs%2Fdatepicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preachjs%2Fdatepicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preachjs","download_url":"https://codeload.github.com/preachjs/datepicker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248512738,"owners_count":21116672,"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":["component","datepicker","headless","preact","ui","unstyled"],"created_at":"2024-09-24T19:41:37.379Z","updated_at":"2025-04-12T03:31:43.212Z","avatar_url":"https://github.com/preachjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @preachjs/datepicker\n\n\u003e Headless Datepicker(s) for preact\n\n- [@preachjs/datepicker](#preachjsdatepicker)\n  - [Highlights](#highlights)\n  - [Usage](#usage)\n    - [Simple Inline Datepicker](#simple-inline-datepicker)\n    - [Create a range select date picker](#create-a-range-select-date-picker)\n    - [API](#api)\n  - [License](#license)\n\n## Highlights\n\n- Lightweight\n- Unstyled\n- Fast and runs on signals\n- For [Preact](https://preactjs.com/)! \u003c3\n\n## Usage\n\n- Install the package and it's deps\n\n```sh\nnpm i preact @preachjs/datepicker @preact/signals\n```\n\n### Simple Inline Datepicker\n\n```js\nimport { Calendar } from '@preachjs/datepicker'\n\nfunction App() {\n  const [date, setDate] = useState()\n  return (\n    \u003c\u003e\n      \u003cCalendar value={date} onSelect={nextValue =\u003e setDate(nextValue)} /\u003e\n    \u003c/\u003e\n  )\n}\n```\n\n### Create a range select date picker\n\n```tsx\nimport { Calendar } from '@preachjs/datepicker'\n\nfunction App() {\n  const [dateRange, setDateRange] = useState([])\n  return (\n    \u003c\u003e\n      \u003cCalendar\n        mode=\"range\"\n        value={dateRange}\n        onSelect={nextValue =\u003e setDateRange(nextValue)}\n      /\u003e\n    \u003c/\u003e\n  )\n}\n```\n\n### API\n\n| prop            | description                                                                                                       | default      |\n| --------------- | ----------------------------------------------------------------------------------------------------------------- | ------------ |\n| `value`         | The current value of the datepicker                                                                               | current date |\n| `onSelect`      | Callback fired when a date selection is successful, in case of `range` selection, it'll fire with both the values |              |\n| `mode`          | Switch between single select and range selection mode                                                             | `single`     |\n| `weekdayFormat` | `narrow,short,long` weekend format on the calendar header                                                         | `narrow`     |\n| `arrowLeft`     | Icon Rendered on the left of the month selector                                                                   | `\u0026lt;`       |\n| `arrowRight`    | Icon Rendered on the right of the month selector                                                                  | `\u0026gt;`       |\n| `readOnly`      | Change to readOnly mode, date selection will do nothing                                                           | `false`      |\n\n## License\n\n[MIT](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreachjs%2Fdatepicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreachjs%2Fdatepicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreachjs%2Fdatepicker/lists"}