1.0.25 • Published 3 years ago

react-analog-time-picker v1.0.25

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

Easy to use and simple to install Analog Time Picker

Demo

https://react-analog-time-picker.netlify.app/

Installation

Install by executing npm i react-analog-time-picker or yarn add react-analog-time-picker. Import by adding import Clock from 'react-analog-time-picker'. Use by adding <Clock />. Use onChange prop for getting new values.

React Analogue Time Picker requires Node.js v10+ to run.

Example

    import React, {useState} from "react";
    import Clock from 'react-analog-time-picker'
    
    export default function TimePicker(){
        const [value, setValue] = useState(new Date())
        const [selected, setSelected] = useState(null)
    
        const onTimeChange = function(time){
            setSelected(time)
        }
    
        return(
            <div>
                <Clock 
                    value={value}
                    onTimeChange={onTimeChange}
                    digitsColor={'white'}
                    fontsColor={'rgb(86, 142, 247)'}
                    backgroundColor={'white'}
                    handsColor={'rgb(86, 142, 247)'}
                    timeSetColor={'rgb(219, 139, 163)'}
                />
            </div>
        )
    }

User Guide

Prop nameDescriptionDefault ValueExample values
onTimeChangeA function called when a time is selectedn/a{ currentHour: Integer, currentMinute: Integer, isAm: Boolean, currentAmOrPm: String }
valueInitial timen/anew Date()
backgroundColorClock background colorwhite'white', 'yellow', etc
fontsColorFont color for the time pickerrgb(86, 142, 247)'white', 'black', etc
digitsColorColor for the clock digitswhite'white', 'yellow', 'blue', etc
handsColorColor for the handsrgb(86, 142, 247)'green','blue', 'pink', etc
timeSetcolorColor for the timeSetrgb(219, 139, 163)''green','blue', 'pink', etc

License

MIT

author: rom.data

Would love to read your thoughts and suggestion at i.mydata132@gmail.com

Troubleshooting

If you get an error starting with "There might be a problem with the project dependency tree". It is caused by yarn. you can either install with npm: 'npx create-react-app --use-npm my-app', or uninstall yarn
1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.12

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago