react-ios-time-picker icon indicating copy to clipboard operation
react-ios-time-picker copied to clipboard

[Typescript] Suporte

Open weider86 opened this issue 3 years ago • 8 comments

You are not supporting typescript. You must do so or not show in your file that you do so.

weider86 avatar Nov 28 '22 21:11 weider86

Here is typescript version, I create- https://www.npmjs.com/package/react-time-picker-typescript

This is also safe for nextjs ssr!

siamahnaf avatar Mar 11 '23 06:03 siamahnaf

Still working on it, will support typescript and many more functionalities like infinite scroll and seconds too

MEddarhri avatar Mar 11 '23 09:03 MEddarhri

Yes it needs the Types file (t.ds). Won't work without it.

exzile avatar Jul 19 '23 05:07 exzile

I am getting the following error when implementing 'use12Hours' prop on this component in a JSX file but in a project that has TypeScript. Works fine without the 'use12Hours' prop. Any ideas how to get this to work?

Component Code <TimePicker use12Hours onChange={(handleTimeChange)} value={value} />

Also doesn't work <TimePicker use12Hours={true} onChange={(handleTimeChange)} value={value} />

Error TimePicker.js:1 Uncaught TypeError: Cannot read properties of undefined (reading 'translatedValue')

Here is my declaration.d.ts file declare module 'react-ios-time-picker';

Entropiks avatar Sep 12 '23 02:09 Entropiks

Hi @Entropiks, you may need to check the value and set it like this "12:00 AM" it needs to have the hour format AM or PM to work, and the typescript version is already in the way with also a lot of changes to come

MEddarhri avatar Sep 12 '23 09:09 MEddarhri

Hi @Entropiks, you may need to check the value and set it like this "12:00 AM" it needs to have the hour format AM or PM to work, and the typescript version is already in the way with also a lot of changes to come

This fixed the issue, thank you! Great component.

Entropiks avatar Sep 12 '23 12:09 Entropiks

Any update on the Typescript? I have been using a different plugin but would prefer yours.

exzile avatar Sep 28 '23 04:09 exzile

This!

GonzaMato avatar Nov 17 '23 17:11 GonzaMato