{"id":19398990,"url":"https://github.com/nayojs/react-datetime-picker","last_synced_at":"2025-09-10T10:36:41.890Z","repository":{"id":253032740,"uuid":"806656617","full_name":"nayojs/react-datetime-picker","owner":"nayojs","description":"React DateTime Picker is a robust and highly customizable date-time picker library for React applications. This component offers seamless integration with various UI designs, allowing developers to choose from a wide range of styling options or apply custom styles to match their projects' specific requirements.","archived":false,"fork":false,"pushed_at":"2024-08-14T02:04:38.000Z","size":114,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-07-06T10:02:57.070Z","etag":null,"topics":["styled-components","typescript","webpack"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@nayojs/react-datetime-picker","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/nayojs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-27T16:11:16.000Z","updated_at":"2024-10-07T03:03:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"01ca6ceb-3ea4-4c43-b3e4-cda81f77fa39","html_url":"https://github.com/nayojs/react-datetime-picker","commit_stats":null,"previous_names":["nayojs/react-datetime-picker"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nayojs/react-datetime-picker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nayojs%2Freact-datetime-picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nayojs%2Freact-datetime-picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nayojs%2Freact-datetime-picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nayojs%2Freact-datetime-picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nayojs","download_url":"https://codeload.github.com/nayojs/react-datetime-picker/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nayojs%2Freact-datetime-picker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266580298,"owners_count":23951193,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":["styled-components","typescript","webpack"],"created_at":"2024-11-10T11:07:52.624Z","updated_at":"2025-07-22T22:04:25.440Z","avatar_url":"https://github.com/nayojs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React DateTime Picker\r\n## Overview\r\n[![npm version](https://badge.fury.io/js/@nayojs%2Freact-datetime-picker.svg)](https://badge.fury.io/js/@nayojs%2Freact-datetime-picker)\r\n[![Downloads](https://img.shields.io/npm/dm/@nayojs/react-datetime-picker.svg)](https://npmjs.org/package/@nayojs/react-datetime-picker)\r\n\r\nReact DateTime Picker is a robust and highly customizable date-time picker library for React applications. This component offers seamless integration with various UI designs, allowing developers to choose from a wide range of styling options or apply custom styles to match their projects' specific requirements.\r\n\r\n![datetime-picker](https://github.com/user-attachments/assets/d0672930-c774-4480-befd-e27d4a9d6263)\r\n\r\n\r\n## Installation\r\nTo install the library, use [npm](https://www.npmjs.com/package/@nayojs/react-datetime-picker):\r\n```ruby\r\nnpm install @nayojs/react-datetime-picker\r\n```\r\n## Features\r\n- **Date Selection:** Easily select dates using the intuitive date picker interface.\r\n- **Time Selection:** Includes a time picker for selecting specific hours and minutes.\r\n- **Calendar View:** Displays a fully interactive calendar for navigating through months and years.\r\n- **Customizable Styles:** Override default styles with ease using CSS classes or a utility function for merging styles.\r\n\r\n## Components\r\n\r\n### 1. DatePicker\r\nThe `DatePicker` component combines the functionality of a calendar and time picker into a single component. It can be customized with styles and classes that are passed down to the `Calendar` and `TimePicker` components.\r\n\r\n### 2. Calendar\r\nThe `Calendar` component provides a visual representation of a calendar where users can select a date. It is fully customizable, allowing developers to define the appearance of various parts of the calendar.\r\n\r\n### 3. TimePicker\r\nThe `TimePicker` component allows users to select a specific time. Like the `Calendar`, it is highly customizable, with various style options for different elements.\r\n\r\n\r\n## Usage\r\n### DatePicker Example\r\n\r\nHere’s a basic example of how to use the `DatePicker` component:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport { DatePicker } from '@nayojs/react-datetime-picker';\r\n\r\nfunction App() {\r\n  const selectDateHandler = (date) =\u003e {\r\n    console.log('Selected Date:', date);\r\n  };\r\n\r\n  const selectTimeHandler = (time) =\u003e {\r\n    console.log('Selected Time:', time);\r\n  };\r\n\r\n  return (\r\n    \u003cdiv\u003e\r\n      \u003cCalendar selectDateHandler={selectDateHandler} selectTimeHandler={selectTimeHandler}/\u003e\r\n    \u003c/div\u003e\r\n  );\r\n}\r\n\r\nexport default App;\r\n```\r\n\r\n### Calendar Example\r\n\r\nTo use the `Calendar` component independently:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport { Calendar } from '@nayojs/react-datetime-picker';\r\n\r\nfunction App() {\r\n  const selectDateHandler = (date) =\u003e {\r\n    console.log('Selected Date:', date);\r\n  };\r\n\r\n  return (\r\n    \u003cdiv\u003e\r\n      \u003cCalendar selectDateHandler={selectDateHandler} /\u003e\r\n    \u003c/div\u003e\r\n  );\r\n}\r\n\r\nexport default App;\r\n```\r\n\r\n### TimePicker Example\r\n\r\nTo use the `TimePicker` component independently:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport { TimePicker } from '@nayojs/react-datetime-picker';\r\n\r\nfunction App() {\r\n  const selectTimeHandler = (time) =\u003e {\r\n    console.log('Selected Time:', time);\r\n  };\r\n\r\n  return (\r\n    \u003cdiv\u003e\r\n      \u003cTimePicker selectTimeHandler={selectTimeHandler} /\u003e\r\n    \u003c/div\u003e\r\n  );\r\n}\r\n\r\nexport default App;\r\n```\r\n\r\n### Custom Styling\r\n\r\nThe `DatePicker`, `Calendar`, and `TimePicker` components come with default styles, but you can easily override them by passing custom class names or styles.\r\n\r\n#### Example: Custom Styles for DatePicker\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport { DatePicker } from '@nayojs/react-datetime-picker';\r\n\r\nfunction App() {\r\n  const selectDateHandler = (date) =\u003e {\r\n    console.log('Selected Date:', date);\r\n  };\r\n\r\n  return (\r\n    \u003cdiv\u003e\r\n      \u003cDatePicker\r\n        selectDateHandler={selectDateHandler}\r\n        datePickerStyles={{\r\n          containerStyles: { width: '300px' },\r\n          triggerStyles: { padding: '10px', backgroundColor: '#f0f0f0' },\r\n        }}\r\n        calendarStyles={{\r\n          containerStyles: { backgroundColor: '#fff' },\r\n          dateStyles: { color: '#333' },\r\n          selectedDateStyles: { backgroundColor: '#1A71FF', color: 'white' },\r\n        }}\r\n      /\u003e\r\n    \u003c/div\u003e\r\n  );\r\n}\r\n\r\nexport default App;\r\n```\r\n\r\n### Style Prop Options\r\n\r\nFor each component, you can override specific style classes and styles:\r\n\r\n- **DatePicker**\r\n  - `containerClass`: Styles the main container of the date picker.\r\n  - `triggerClass`: Styles the trigger button/input.\r\n  - `calendarClasses`: Classes passed down to the Calendar component.\r\n  - `calendarStyles`: Styles passed down to the Calendar component.\r\n\r\n- **Calendar**\r\n  - `containerClass`: Styles the main container of the calendar.\r\n  - `headerClass`: Styles the header of the calendar.\r\n  - `dateClass`: Styles individual date cells.\r\n  - `selectedDateClass`: Styles the selected date.\r\n  - `navigatorClass`: Styles the navigation buttons.\r\n\r\n- **TimePicker**\r\n  - `containerClass`: Styles the main container of the time picker.\r\n  - `triggerClass`: Styles the trigger button/input.\r\n  - `timeContainerClass`: Styles the time selection container.\r\n  - `timeItemClass`: Styles each time option.\r\n  - `selectedTimeItemClass`: Styles the selected time option.\r\n\r\n## Default Styles\r\n\r\nThe library provides default styles for all components. If you do not override these styles, the components will use the following defaults:\r\n\r\n- [DatePicker Styles](src/components/DatePicker/styles/defaultStyles.ts)\r\n- [Calendar Styles](src/components/Calendar/styles/defaultStyles.ts)\r\n- [TimePicker Styles](src/components/timepicker/defaultStyles.ts)\r\n\r\n\r\n## Advanced Usage\r\n\r\n### Overriding Default Styles with Helper Function\r\n\r\nTo ensure that overriding a specific style doesn’t remove other default styles, use the `mergeStyles` utility function:\r\n\r\n```jsx\r\nimport React from 'react';\r\nimport { DatePicker, mergeStyles } from '@nayojs/react-datetime-picker';\r\n\r\nconst customStyles = mergeStyles({\r\n  nayojsDatetimePickerContainer: 'background-color: blue;',\r\n});\r\n\r\nfunction App() {\r\n  const selectDateHandler = (date) =\u003e {\r\n    console.log('Selected Date:', date);\r\n  };\r\n\r\n  return (\r\n    \u003cdiv\u003e\r\n      \u003cDatePicker\r\n        selectDateHandler={selectDateHandler}\r\n        datePickerStyles={customStyles}\r\n      /\u003e\r\n    \u003c/div\u003e\r\n  );\r\n}\r\n\r\nexport default App;\r\n```\r\n\r\n## Contribution\r\n\r\nIf you'd like to contribute to the project, please follow these guidelines:\r\n\r\n1. Fork the repository.\r\n2. Create a new branch.\r\n3. Make your changes and commit them.\r\n4. Push to your branch and submit a pull request.\r\n\r\n## Show your support\r\nIf you find EduMeet helpful, please give us a star ⭐️ on GitHub! Your support is greatly appreciated and motivates us to keep improving the project.\r\n\r\n## Author\r\n:bust_in_silhouette: **RWUBAKWANAYO**\r\n- GitHub: [https://github.com/RWUBAKWANAYO](https://github.com/RWUBAKWANAYO)\r\n- LinkedIn: [https://www.linkedin.com/in/rwubakwanayo/](https://www.linkedin.com/in/rwubakwanayo/)\r\n\r\n## 📝 License\r\nReact DateTime Picker is licensed under the MIT License. For more information, see the [LICENSE file](https://github.com/git/git-scm.com/blob/main/MIT-LICENSE.txt).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnayojs%2Freact-datetime-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnayojs%2Freact-datetime-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnayojs%2Freact-datetime-picker/lists"}