nysamnang / react-native-24h-timepicker Goto Github PK
View Code? Open in Web Editor NEWReact Native 24 hours format TimePicker for iOS
License: MIT License
React Native 24 hours format TimePicker for iOS
License: MIT License
Please, update package to eliminate debug warning message:
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.
* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
Please update the following components: TimePicker
Hi!
My screen is rerendering in the background as there's progressbars etc which are updating. On every update (once per second) my input into the timepicker is lost (has I haven't been able to press "DONE".
Is there a way to att an "onChange" method to the component?
Or how can this be solved?
Thanks,
D
Hi! ๐
Picker has been removed from React Native. It can now be installed and imported from '@react-native-picker/picker' instead of 'react-native' ,
After upgrading react native to the latest version it stopped using Picker which is called in the react-native-24h-timepicker package
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-24h-timepicker/src/index.js b/node_modules/react-native-24h-timepicker/src/index.js
index 14e68e6..9e13701 100644
--- a/node_modules/react-native-24h-timepicker/src/index.js
+++ b/node_modules/react-native-24h-timepicker/src/index.js
@@ -1,6 +1,7 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
-import { View, TouchableOpacity, Text, Picker } from "react-native";
+import { View, TouchableOpacity, Text } from "react-native";
+import {Picker} from '@react-native-picker/picker';
import RBSheet from "react-native-raw-bottom-sheet";
import styles from "./styles";
This issue body was partially generated by patch-package.
I'm using this library but I can't use the 12hour maixmumHour because it don't have the period of time. So I stay in 24 hours so that I can determine if it's PM or AM.
I hope you can work on the time period.
Hi,
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.
npx react-codemod rename-unsafe-lifecycles
in your project source folder.Please update the following components: TimePicker
Everything is in the title. I have copied and pasted the exemple code but still have this issue.
When I only set hour sand hit confirm, it works.
When I only set minutes and hit confirm, it works.
When I set both, it goes back to 0:00 before I can hit the confirm button.
Tested on iPhone 11 Pro Max IOS 14.0
A feature request for being able to set the Minimum Hour.
Hi
If I have two TimePicker and set ref for both of them 'TimePicker', when I change value of second TimePicker, just the value of first one is changed.
React Native 0.63
Xcode 12.1
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
Animated:
useNativeDriverwas not specified. This is a required option and must be explicitly set to
trueor
false``
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.