0.1.5 • Published 10 months ago

@ray-js/components-ty-time-picker v0.1.5

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

English | 简体中文

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

latest download

Tuya TimePicker. Base library version 2.3.0 and above available

Installation

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

Usage

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>
  );
}
0.1.8-beta-2

10 months ago

0.1.8-beta-1

10 months ago

0.1.7-beta-1

1 year ago

0.1.6-beta-5

1 year ago

0.1.6-beta-3

1 year ago

0.1.6-beta-4

1 year ago

0.1.6-beta-1

1 year ago

0.1.6-beta-2

1 year ago

0.1.3

2 years ago

0.1.5

2 years ago

0.1.3-beta-1

2 years ago

0.1.3-beta-3

2 years ago

0.1.3-beta-2

2 years ago

0.1.3-beta-4

2 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago