Gathering detailed insights and metrics for react-time-picker-digital
Gathering detailed insights and metrics for react-time-picker-digital
Gathering detailed insights and metrics for react-time-picker-digital
Gathering detailed insights and metrics for react-time-picker-digital
react-material-time-picker
TimePicker is a user interface component that allows the user to easily select a specific time. It provides an analog clock interface that is easy to use and intuitive. TimePicker can be easily integrated into other user interface components, making it a
react-time-picker-roll
A simple time picker component for React
npm install react-time-picker-digital
Typescript
Module System
Node Version
NPM Version
27.7
Supply Chain
57.7
Quality
72.1
Maintenance
50
Vulnerability
90.1
License
JavaScript (74.63%)
CSS (25.37%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
939
Last Day
2
Last Week
15
Last Month
34
Last Year
939
22 Commits
1 Watching
2 Branches
1 Contributors
Latest Version
0.2.5
Package Id
react-time-picker-digital@0.2.5
Unpacked Size
193.53 kB
Size
54.21 kB
File Count
13
NPM Version
8.19.2
Node Version
19.0.0
Publised On
21 Aug 2024
Cumulative downloads
Total Downloads
Last day
0%
2
Compared to previous day
Last week
114.3%
15
Compared to previous week
Last month
0%
34
Compared to previous month
Last year
0%
939
Compared to previous year
A bilingual (English/Persian) and responsive digital time picker library with customizable color options. Perfect for modern web applications requiring dynamic and stylish time selection.
You can install the package using npm or yarn:
1npm install react-time-picker-digital
or
1yarn add react-time-picker-digital
TimePicker is a versatile and user-friendly React component designed to allow users to select time easily. With its intuitive interface and responsive design, TimePicker ensures a seamless experience across all devices.
Key Features:
Bilingual Support: TimePicker supports both English and Persian languages, making it accessible for a wider audience.
Responsive Design: The component adapts to various screen sizes and devices, ensuring a consistent user experience whether on mobile or desktop.
Customizable Color Options: Choose from a variety of color options to match your application's design and theme.
Smooth Scrolling: Navigate through hours and minutes with smooth scrolling functionality.
Easy Integration: Simply import the component and use it in your project with minimal
Here is screenshots of the TimePicker
component:
color
, backgroundColor
, textColor
, and numbersColor
to match your design needs.fa
). It automatically adjusts text and layout direction based on the selected language.sendDataToParent
function allows you to send the selected hour and minute back to the parent component.prevPage
and nextPage
links.Here is an example of how to use the TimePicker component in your React application:
1 2import React, { useState } from "react"; 3import { TimePicker } from "react-time-picker-digital"; 4 5function App() { 6 var [hour, setHour] = useState(); 7 var [minute, setMinute] = useState(); 8 function handleDataFromChild(data) { 9 setHour(data.hour); 10 setMinute(data.minute); 11 console.log("hour", hour); 12 console.log("minute", minute); 13 } 14 15 return ( 16 <div className='App'> 17 <TimePicker 18 backgroundColor={"#fff"} 19 color={"crimson"} 20 textColor={"black"} 21 numbersColor={"gray"} 22 language={"en"} 23 prevPage={"/"} 24 nextPage={"/about"} 25 sendDataToParent={handleDataFromChild} 26 /> 27 </div> 28 ); 29} 30 31export default App; 32
Prop Type Default Description sendDataToParent function Required Function to send the selected time to the parent. prevPage string Required Link to the previous page. nextPage string Required Link to the next page.
Prop | Type | Default | Description |
---|---|---|---|
sendDataToParent | function | Required | A callback function to send the selected hour and minute to the parent component. |
prevPage | string | Required | The URL to navigate to when the back button is clicked. |
nextPage | string | Required | The URL to navigate to when the confirm button is clicked. |
language | string | "en" | Determines the language of the timepicker. The user can select between Persian ('fa') and English ('en'). |
color | string | "#2088B4" | Sets the color theme of the timepicker selected hour and minute. The user can select any valid CSS color. |
backgroundColor | string | "#fff" | Sets the color theme of the timepicker background color. The user can select any valid CSS color. |
textColor | string | "#000000" | Sets the color theme of the timepicker text color. The user can select any valid CSS color. |
numbersColor | string | "#bababa" | Sets the color theme of the timepicker numbers list color. The user can select any valid CSS color. |
Smooth Scrolling: Ensure that your container has sufficient height to enable smooth scrolling. Adjust CSS styles if you encounter performance issues.
Custom Styling: Use the color
, backgroundColor
, textColor
, and numbersColor
props to tailor the appearance of the time picker to match your application's theme.
Language Direction: The component automatically adjusts text direction based on the selected language. For right-to-left languages (like Persian), the layout will adapt accordingly.
Initial Values: If you want to set default values for the hour and minute, consider using the scrollTo
method in useEffect
to programmatically set the initial scroll position.
Testing: When testing the component, ensure to test across different devices and screen sizes to confirm that the responsive design works as expected.
Q: How do I customize the appearance of the time picker?
A: You can customize the appearance using the color, backgroundColor, textColor, and numbersColor props. These allow you to set colors for different elements within the time picker.
Q: What languages are supported by the time picker?
A: The time picker supports English and Persian. You can switch between these languages using the language prop.
Q: Can I use the time picker in a non-React project?
A: The time picker is built for React and requires React to be installed in your project. For non-React projects, you may need to find or build an alternative component.
Q: How do I handle the selected time data?
A: The selected time data is passed to the sendDataToParent callback function when the user confirms their selection. The data will include the selected hour and minute.
Q: What should I do if the component is not rendering correctly?
A: Ensure that the component is correctly imported and that all required props are provided. Check the console for any errors and make sure that your environment meets the necessary requirements.
Contributions are welcome! Please create an issue or a pull request.
For any questions or feedback, please contact me via:
Email: [hossein.azp94@gmail.com]
LinkedIn: [https://www.linkedin.com/in/hosseinazadpour]
This project is licensed under the MIT License - see the LICENSE file for details.
https://github.com/HosseinAzadpour/react-time-picker-digital
No vulnerabilities found.
No security vulnerabilities found.