0.1.4 • Published 2 years ago

hidden-meddarhri-test v0.1.4

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

npm downloads

React-Ios-Time-Picker

A modern time picker for your next React app.

  • Supports virtually any language
  • No moment.js needed
  • almost zero dependencies

install

npm install react-ios-testing-here

Usage

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

function MyApp() {
   const [value, onChange] = useState('10:00');

   return (
      <div>
         <TimePicker onChange={onChange} value={value} />
      </div>
   );
}

API

TimePicker

NameTypeDefaultDescription
valueStringnullcurrent value.
cellHeightnumber35the height of the cell number.
placeHolderstring'Select time'time input's placeholder.
pickerDefaultValuestring'00:00'the initial value that the picker begin with in the first time.
disabledBooleanfalsewhether picker is disabled.
isOpenbooleanfalseWhether the time picker should be opened.
requiredbooleanfalseWhether time input should be required.
cancelButtonTextstring'Cancel'cancel button text content
saveButtonTextString'Save'cancel button text content
controllersbooleantrueWhether the buttons should be displayed
seperatorbooleantruewhether show the colon seperator
idString''time picker id
onChange(value) => alert('New time is: ', value)nullcalled when select a different value
onSave(value) => alert('Time saved is: ', value)When the user clicks on save button
onClose() => alert('Clock closed')when the user clicks on cancel button

License

The MIT License.