react-native-date-picker icon indicating copy to clipboard operation
react-native-date-picker copied to clipboard

[iOS] Minute interval doesn't work with mode 'time'

Open dansiemens opened this issue 6 years ago • 7 comments

Describe the bug When the mode is set to 'time', the minuteInterval prop has no effect (iOS only). Notably, it works when mode is 'datetime'.

Expected behavior Minute interval prop should work on iOS when mode is time

To Reproduce Add example code that reproduces the behavior.

export default class App extends Component {

  state = { date: new Date() }

  render = () =>
    <DatePicker
      mode='time'
      minuteInterval={15}
      date={this.state.date}
      onDateChange={date => this.setState({ date })}
    />

}

Smartphone (please complete the following information):

  • OS: iOS 12.1
  • React Native version: 0.61.4
  • react-native-date-picker version: 2.7.0

dansiemens avatar Dec 19 '19 01:12 dansiemens

Hi, thanks for reporting this. I have tried but I don't manage to reproduce it. Could you please double-check that you actually are running the exact code above? Which iPhone model are you using?

My result with your code sample and software versions.

Screenshot 2019-12-27 at 23 28 21

henninghall avatar Dec 27 '19 22:12 henninghall

+1

xhirazi avatar Jan 14 '20 12:01 xhirazi

Bump @dansiemens 🙂Did you have any additional information?

henninghall avatar Jan 14 '20 17:01 henninghall

@henninghall Tried to reproduce after upgrading to 2.7.2 and i can no longer reproduce the issue. Found the issue only on 2.7.0, running Xcode 10.1, reproduced in 12.1 simulator and on iPhone 6 and iPhone X both running 12.x.

dansiemens avatar Jan 14 '20 17:01 dansiemens

Thanks a lot! @xhirazi Could you try upgrading to version 2.7.2 or above and see if that helps?

henninghall avatar Jan 14 '20 17:01 henninghall

Found a way to reproduce this, and have a fix ready. Will merge https://github.com/henninghall/react-native-date-picker/pull/155 and release a new version shortly.

henninghall avatar Jan 20 '20 12:01 henninghall

Released in v2.7.4

henninghall avatar Jan 23 '20 20:01 henninghall