1.1.2 • Published 12 months ago

time-picker-input-react-component v1.1.2

Weekly downloads
-
License
-
Repository
-
Last release
12 months ago

Time picker React Component

Overview

This react component was programmed as a variation on the classique HTML inputtype='time' tag. It follows some different rules compared to the traditionnal time input that makes it more adapted for inputing an amount of time instead of a specific time of day (so no AM or PM notation).

Demo

Video Title

QuickStart

Installation

To install the component, run the following command in your terminal:

npm install time-picker-input

Importing

Import the component into your React application using the following code:

import TimePickerInput from 'time-picker-input';

Usage

To use the component in your React application, simply add following tag wherever you'd like :

<TimePickerInput /> 

Properties

Here is an exemple including all the possible properties to include in the component:

<TimePickerInput 
    id="foo"
    value="99:59"
    onTimeChange={ (HHMM_String) => { console.log(HHMM_String) } }
/> 

Note

When an Id is provided, it is possible to access the 2 individual input elements (one for hours and one for minutes) with the following:

    const myId = "foo";

    const hoursInputElement = document.getElementById(myId + "-hours");
    const minutesInputElement = document.getElementById(myId + "-minutes");

Author

Sebastien Roy

1.1.1

12 months ago

1.1.2

12 months ago

1.1.0

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago