[Typescript] Suporte
You are not supporting typescript. You must do so or not show in your file that you do so.
Here is typescript version, I create- https://www.npmjs.com/package/react-time-picker-typescript
This is also safe for nextjs ssr!
Still working on it, will support typescript and many more functionalities like infinite scroll and seconds too
Yes it needs the Types file (t.ds). Won't work without it.
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';
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
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.
Any update on the Typescript? I have been using a different plugin but would prefer yours.
This!