question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Respect Minimum time on Time mode

See original GitHub issue

Bug

Cannot set minimum time to select when in time mode

Environment info

React native info output:

System:
    OS: macOS 10.15.2
    CPU: (4) x64 Intel(R) Core(TM) i7-6567U CPU @ 3.30GHz
    Memory: 125.68 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.11.0 - /usr/local/bin/node
    Yarn: 1.10.1 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
    Watchman: 4.7.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5977832
    Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.8.6 => 16.8.6 
    react-native: 0.60.4 => 0.60.4 
  npmGlobalPackages:
    react-native-cli: 2.0.1

Library version: 2.2.3

Steps To Reproduce

  1. Create an time field 2.add the minimumdate as new Date(today2.getTime() + 7200000) …

Describe what you expected to happen:

  1. The time picker should respect the limit
  2. In my case I have two separate Datetimepickers, one for date and one for time

Reproducible sample code

minimumTime: new Date(today2.getTime() + 7200000)

<DateTimePicker
          titleIOS={dateTimePickerMode === 'date' ? 'Pick a date' : 'Pick a time'}
          mode={dateTimePickerMode}
          isVisible={isDateTimePickerVisible}
          isDarkModeEnabled={colorScheme === 'dark'}
          onConfirm={this.onDateTimePickerConfirm}
          onCancel={this.hideDateTimePicker}
          minimumDate={dateTimePickerMode === 'date' ? this.state.minimumDate : this.state.minimumTime}
          maximumDate={dateTimePickerMode === 'date' ? this.state.maximumDate : null}
          date={initialSelectedDate}
          minuteInterval={dateTimePickerMode === 'time' ? 15 : 1}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:13
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
zach-lumancommented, Apr 21, 2020

any solution here?

0reactions
vonovakcommented, Jun 3, 2020

Hello, this bug / feature request is being closed because Android Time picker does not support this functionality. This is now clarified in the readme: https://github.com/react-native-community/datetimepicker/pull/183/files

Read more comments on GitHub >

github_iconTop Results From Across the Web

Alert sampling interval does not respect minimum time interval
The minimum time interval of the graph is 1m. The alert does not get triggered because of this. The interval used by the...
Read more >
In California, what rules apply when determining what ... - SHRM
California wage-and-hour law clearly states that any hour an employee spends performing work on behalf of the organization, or work that the organization ......
Read more >
Stress Relaxation: Theories - RepTate documentation
The number of modes can be selected by pressing the Up/Down arrows in the theory window. The relaxation times of the Maxwell modes...
Read more >
time — Time access and conversions — Python 3.11.1 ...
The epoch is the point where the time starts, the return value of time.gmtime(0) . It is January 1, 1970, 00:00:00 (UTC) on...
Read more >
10 Strategies for Better Time Management - UGA Extension
You may often wish for more time, but you only get 24 hours, 1,440 minutes, or 86,400 seconds each day. How you use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found