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

DatePickerIOS ignores minuteInterval in "time" mode #5967

Closed
Somojojojo opened this issue Feb 17, 2016 · 11 comments
Closed

DatePickerIOS ignores minuteInterval in "time" mode #5967

Somojojojo opened this issue Feb 17, 2016 · 11 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@Somojojojo
Copy link

I've seen this issue posted once before but it was closed for some reason, even though users were still reporting it was broken. It seems to have been lost in the haystack so I'm reviving it.

The issue is: When you render a DatePickerIOS component with the mode set to time and the minuteInterval set to any integer (let's say 5, for example), the resulting component ignores the minuteInterval and draws normal incremental minutes, instead of those divisible by 5.
Set the mode to datetime and suddenly the component draws the minuteInterval correctly.

@facebook-github-bot
Copy link
Contributor

Hey Somojojojo, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If you don't know how to do something or something is not working as you expect but not sure it's a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!

@christopherdro
Copy link
Contributor

I believe the original issue was #2763.

What version of RN are you on?

Also any change you can throw a quick demo of it on rnplay.org? Its running on 0.20 stable right now.

@Somojojojo
Copy link
Author

We are running 0.19. I see that the 0.20 version seems to be working just fine. That's really weird though, because the datepicker stuff hasn't been touched in months. Is there any way to change rnplay to use older releases, to see if it's just 0.20 that fixes it?

@christopherdro
Copy link
Contributor

@Somojojojo
Unfortunately, rnplay only supports 0.20 at the moment. However, I just did a fresh install of both 0.19 & 0.20, and the minuteInterval prop works just fine in both time and datetime mode.

@Somojojojo
Copy link
Author

Chris, I updated our react native install and tried the widget elsewhere
and it is working now... So weird. Sorry for bothering you, you can close
this issue.
On Feb 19, 2016 5:51 PM, "Christopher Dro" notifications@github.com wrote:

@Somojojojo https://github.com/Somojojojo
Unfortunately, rnplay only supports 0.20 at the moment. However, I just
did a fresh install of both 0.19 & 0.20, and the minuteInterval prop
works just fine in both time and datetime mode.


Reply to this email directly or view it on GitHub
#5967 (comment)
.

@christopherdro
Copy link
Contributor

👍 No worries! Glad you got it resolved.

@ilove8
Copy link

ilove8 commented Sep 23, 2016

Is it ok now? I updated react native version 0.31, but DatePickerIOS ignores minuteInterval in "time" mode.

@dizlexik
Copy link
Contributor

I just created a brand new project with 0.38 and this is still an issue. minuteInterval does not work with mode="time", but does work with mode="datetime". I wonder how this ever worked for anyone... or has there been a regression? I really need this to work with mode="time" :/

@dizlexik
Copy link
Contributor

So I found issue #9566 while investigating this and @dsibiski's workaround of adding width: 320 back to the styles in DatePickerIOS.ios.js resolved this issue for me.

dizlexik referenced this issue Nov 30, 2016
Summary: The DatePicker had a hard-coded width of 320 for no reason I can think of. Removing it allows the DatePicker to naturally scale to fit the width of the container, which is how the regular Picker works already.

Reviewed By: lexs

Differential Revision: D3371355

fbshipit-source-id: e06d31f7275de41bb00226232cf47ad022d25b4d
@kalanaw
Copy link

kalanaw commented Mar 9, 2017

The problem is still there with 0.41.2 and it's quite annoying. Setting the hardcoding a width in DatePickerIOS.ios.js works but certainly not the solution. Can anyone suggest a better looking hack?

@noaharogers
Copy link

noaharogers commented Sep 5, 2017

Still not working in 0.42.3. Adding width: '100%' allows the DatePicker to naturally scale to fit the width of the parent container.

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

8 participants