mmazzarolo / react-native-modal-datetime-picker

A React-Native datetime-picker for Android and iOS
MIT License
2.98k stars 399 forks source link

TypeScript issue on display prop #567

Closed Adam-Schlichtmann closed 2 years ago

Adam-Schlichtmann commented 3 years ago

Environment

Expo Snack

Platforms

iOS - IPad Air 3

Versions

Description

Display prop is giving a TS error when set to inline or compact EDIT: This is also an issue for setting the display prop to calendar or clock (Anything that isn't spinner or default)

Screen Shot 2021-05-10 at 11 58 30 AM

Reproducible Demo

Example using both packages available Expo Snack

mmazzarolo commented 3 years ago

Thanks for reporting. Yeah, I assume this is because we're not differentiating types based on the platform? Not a TypeScript expert... anyone willing to try to fix it?

DilipCoder commented 3 years ago

hi, I would like to work on this issue. can you please break down tasks for me?

mmazzarolo commented 3 years ago

Hey @DilipCoder , I'd love to give you more details but I'm not too familiar with this part of TypeScript. Basically, we'd need to differentiate props depending on what Platform.OS is. Not sure how other repos are handling this

DilipCoder commented 3 years ago

okay I am forking the repository will raise a PR this weekend

mnajjarian commented 3 years ago

Hey @DilipCoder, How does it go? I can do it if you don't mind.

DilipCoder commented 3 years ago

hey i was going through the design patterns used in this repo. I will raise the draft pr soon.

toothlesspanda commented 2 years ago

Hi! So this is weird, I am still having the same error as the primary issue here image I was trying to follow up the progress of this, then I saw this issue was solved in between some versions (I think version 10), but I am still getting the same error and the version of my package is 13, which is the latest release.

 "@react-native-community/datetimepicker": "^4.0.1",
 "react-native-modal-datetime-picker": "^13.0.0",

edit: okay, this is even weirder xD, the code compiles anyway and it's showing the modal as it is suppose to be. still weird. just refreshed all the caches and didn't change :thinking:

mmazzarolo commented 2 years ago

@toothlesspanda the issue has not been solved :) We're waiting for contributions in #585

ghost commented 2 years ago

@mmazzarolo I applied your request changes in that PR, I will commit later 🙏🏾

edit: sorry, I am @toothlesspanda, just switched to my professional account and forgot about it xD

mmazzarolo commented 2 years ago

thank you!

mmazzarolo commented 2 years ago

closed #636