Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Typescript] Suporte #5

Open
weider86 opened this issue Nov 28, 2022 · 8 comments
Open

[Typescript] Suporte #5

weider86 opened this issue Nov 28, 2022 · 8 comments

Comments

@weider86
Copy link

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

@siamahnaf

This comment was marked as spam.

@MEddarhri
Copy link
Owner

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

@exzile
Copy link

exzile commented Jul 19, 2023

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

@Entropiks
Copy link

Entropiks commented Sep 12, 2023

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';

@MEddarhri
Copy link
Owner

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

@Entropiks
Copy link

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.

@exzile
Copy link

exzile commented Sep 28, 2023

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

@GonzaMato
Copy link

This!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants