# @ray-js/components-ty-time-picker

> 涂鸦风格时间选择器

Latest version **0.1.5** (published 2023-05-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ray-js/components-ty-time-picker
pnpm add @ray-js/components-ty-time-picker
yarn add @ray-js/components-ty-time-picker
bun add @ray-js/components-ty-time-picker
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2023-05-23 |
| First published | 2022-07-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 17.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | tuyafe |

## Links

- npm: https://www.npmjs.com/package/@ray-js/components-ty-time-picker
- npm.io page: https://npm.io/package/@ray-js/components-ty-time-picker

## Dependencies (1)

- [color](https://npm.io/package/color.md) ^3.2.1

## Recent versions

- 0.1.5 (latest) — 2023-05-23
- 0.1.8-beta-2 (beta) — 2024-08-16
- 0.1.8-beta-1 — 2024-08-16
- 0.1.7-beta-1 — 2024-05-16
- 0.1.6-beta-5 — 2024-05-06
- 0.1.6-beta-4 — 2024-03-18
- 0.1.6-beta-3 — 2024-03-18
- 0.1.6-beta-2 — 2024-03-18
- 0.1.6-beta-1 — 2024-03-18
- 0.1.3 — 2023-05-19
- 0.1.3-beta-4 — 2023-03-29
- 0.1.3-beta-3 — 2023-03-29
- 0.1.3-beta-2 — 2023-03-29
- 0.1.3-beta-1 — 2023-03-29
- 0.1.2 — 2022-11-15
- … 2 more at https://npm.io/package/@ray-js/components-ty-time-picker/versions

## README

English | [简体中文](./README-zh_CN.md)

# @ray-js/components-ty-time-picker

[![latest](https://img.shields.io/npm/v/@ray-js/components-ty-time-picker/latest.svg)](https://www.npmjs.com/package/@ray-js/components-ty-time-picker) [![download](https://img.shields.io/npm/dt/@ray-js/components-ty-time-picker.svg)](https://www.npmjs.com/package/@ray-js/components-ty-time-picker)

> Tuya TimePicker. Base library version 2.3.0 and above available

## Installation

```sh
$ npm install @ray-js/components-ty-time-picker
# or
$ yarn add @ray-js/components-ty-time-picker
```

## Usage

```tsx
import React from 'react';
import { View } from '@ray-js/components';
import TyTimePicker from '@ray-js/components-ty-time-picker';

export default function Template() {
  const [time, setTime] = React.useState({
    hour: new Date().getHours(),
    minute: new Date().getMinutes(),
  });

  const handleTimeChange = (value: { hour: number; minute: number }) => {
    setTime(value);
  };

  return (
    <View>
      <TyTimePicker is24Hour value={time} onChange={handleTimeChange} />
      <TyTimePicker
        is24Hour={false}
        value={time}
        onChange={handleTimeChange}
        amText="AM"
        pmText="PM"
      />
    </View>
  );
}
```

---
_Source: https://npm.io/package/@ray-js/components-ty-time-picker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
