0.3.0 • Published 2 years ago

ios-react-time-picker v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

ios-react-time-picker

ios style time picker for React app šŸ˜Ž.

install

npm i ios-react-time-picker

how to use

import React, { useState } from 'react';
import { TimePicker } from 'ios-react-time-picker';

export default const  MyApp = () => {
   const [value, setValue] = useState('10:00');

   const onChange = (timeValue) => {
      setValue(timeValue);
   }

   return (
      <div>
         <TimePicker value={value} onChange={onChange} hourType={12} minType={1} />
      </div>
   );
}

Example

default12-hour24-hour
12hour demo12hour demo24hour demo
1-minutes5-minutes10-minutes
default demo5minutes demo10minutes demo

API

NameTypeDefaultDescription
valuestringN/AThe current selected time in string format.
onChangeDispatch<SetStateAction<string>>N/AFunction called when the time value changes.
hourType12 \| 2424Determines whether to use a 12-hour or 24-hour format for the time display.
minType1 \| 5 \| 101Interval for minutes, allowing 1, 5, or 10-minute increments.

License

The MIT License.

0.3.0

2 years ago

0.2.33

2 years ago

0.2.22

2 years ago

0.2.21

2 years ago

0.2.12

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.34

2 years ago

0.1.33

2 years ago

0.1.32

2 years ago

0.1.31

2 years ago

0.1.22

2 years ago

0.1.21

2 years ago

0.1.20

2 years ago

0.1.17

2 years ago

0.1.16

2 years ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago