# react-time-textfield

> Material UI TextField with controlled hour/minute/meridiem input

Latest version **1.0.9** (published 2023-09-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-time-textfield
pnpm add react-time-textfield
yarn add react-time-textfield
bun add react-time-textfield
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2023-09-30 |
| First published | 2023-02-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Patrick S. Young |
| Maintainers | patrick-s-young |
| Keywords | react, time, textfield |

## Links

- npm: https://www.npmjs.com/package/react-time-textfield
- Repository: https://github.com/patrick-s-young/react-time-textfield
- Homepage: https://github.com/patrick-s-young/react-time-textfield#readme
- Issues: https://github.com/patrick-s-young/react-time-textfield/issues
- npm.io page: https://npm.io/package/react-time-textfield

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.9 (latest) — 2023-09-30
- 1.0.8 — 2023-02-20
- 1.0.7 — 2023-02-18
- 1.0.6 — 2023-02-17
- 1.0.5 — 2023-02-17
- 1.0.4 — 2023-02-17
- 1.0.3 — 2023-02-17
- 1.0.2 — 2023-02-17
- 1.0.1 — 2023-02-17
- 1.0.0 — 2023-02-16

## README

# React-Time-TextField

A controlled Material-UI TextField for keyboard time input.

![react-time-textfield-demo](https://user-images.githubusercontent.com/42591798/219899124-abe75346-f33a-4371-8d22-34c729d31ecf.gif)

## Quick Start

- Install by executing `npm install react-time-textfield` or `yarn add react-time-textfield`.
- Import by adding `import { ReactTimeTextField } from 'react-time-textfield'`.
- Use by adding `<ReactTimeTextField />`. Assign callback to `onBlur` prop to receive new value.
- Hours/Minutes/Meridiem can be input using both keyboard and up/down arrows. Use Tab and right/left arrows to navigate.


## Getting started

### Installation

Add React-Time-TextField to your project by executing `npm install react-time-textfield` or `yarn add react-time-textfield`.

### Usage

Here is an example of basic usage:

```js
import React, { useState } from 'react';
import { ReactTimeTextField } from 'react-time-textfield';

function MyApp() {
  const [value, setValue] = useState(new Date());

  return (
   <ReactTimeTextField
    value={value}
    label='Start Time'
    onBlur={setValue}
   />
  );
}
```

### Custom styling

ReactTimeTextField uses Material-UI TextField. Just pass any styling-related props that the Mui TextField component uses and they will be applied:
```
 <ReactTimeTextField
  value={value}
  label='Start Time'
  onBlur={setValue}
  size='large'
  styles={{ width: '100px', height: '60px' }}
 />
```

NOTE: *onChange*, *onKeyDown*, and *onClick* props are used internally and are not available. Use *onBlur* callback to receive date object with specified time value.



## License

The MIT License.

## Author
[Patrick S. Young](https://github.com/patrick-s-young)

---
_Source: https://npm.io/package/react-time-textfield · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
