Gathering detailed insights and metrics for react-time-picker-typescript
Gathering detailed insights and metrics for react-time-picker-typescript
Gathering detailed insights and metrics for react-time-picker-typescript
Gathering detailed insights and metrics for react-time-picker-typescript
his is a fork of react-ios-time-picker adding typescript support and fixing nextjs implementation!
npm install react-time-picker-typescript
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
2 Stars
4 Commits
1 Forks
1 Watching
1 Branches
1 Contributors
Updated on 21 Nov 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
88.2%
32
Compared to previous day
Last week
-29.6%
100
Compared to previous week
Last month
45%
509
Compared to previous month
Last year
117.6%
3,618
Compared to previous year
3
This is a fork of react-ios-time-picker adding typescript support and fixing nextjs implementation!
A modern time picker for your next React app.
npm install react-time-picker-typescript
1import React, { useState } from 'react'; 2import { TimePicker } from "react-time-picker-typescript"; 3import "react-time-picker-typescript/dist/style.css"; 4 5export default const MyApp = () => { 6 const [value, setValue] = useState('10:00'); 7 8 const onChange = (timeValue) => { 9 setValue(timeValue); 10 } 11 12 return ( 13 <div> 14 <TimePicker onChange={onChange} value={value} /> 15 </div> 16 ); 17}
1import React, { useState } from 'react'; 2import { TimePicker } from "react-time-picker-typescript"; 3import "react-time-picker-typescript/dist/style.css"; 4 5export default const MyApp = () => { 6 const [value, setValue] = useState('10:00 AM'); 7 8 const onChange = (timeValue) => { 9 setValue(timeValue); 10 } 11 12 return ( 13 <div> 14 <TimePicker onChange={onChange} value={value} use12Hours/> 15 </div> 16 ); 17}
Name | Type | Default | Description |
---|---|---|---|
value | String | n/a | Current value. |
cellHeight | Number | 35 | The height of the cell number. |
placeHolder | String | "Selet_time" | Time input's placeholder. |
pickerDefaultValue | String | "00:00" | The initial value that the picker begin with in the first time. |
disabled | Boolean | false | Whether picker is disabled. |
isOpen | Boolean | false | Whether the time picker should be opened. |
required | Boolean | false | Whether time input should be required. |
cancelButtonText | String | "Cancel" | Cancel button text content |
saveButtonText | String | "Save" | Save button text content |
controllers | Boolean | true | Whether the buttons should be displayed |
seperator | Boolean | true | whether show the colon seperator |
id | String | n/a | Input time picker id |
name | String | n/a | Input time picker name |
use12Hours | Boolean | false | 12 hours display mode |
inputClassName | String | n/a | Input time picker className |
popupClassName | String | n/a | time picker popup className |
onChange | (value) => alert ('New time is: ', value) | n/a | Called when select a different value |
onSave | (value) => alert ('Time saved is: ', value) | n/a | When the user clicks on save button |
onClose | () => alert('Clock closed') | n/a | When the user clicks on cancel button |
onAmPmChange | (value) => alert('Am/Pm changed : value') | n/a | called when select an am/pm value |
onOpen | () => alert('time picker opened') | n/a | called when time picker is opened |
The MIT License.
No vulnerabilities found.
No security vulnerabilities found.