Comments (3)
You can achieve this now with some tweaking to the index.js source file for this module. If you go into your node_modules folder and find the folder for this module, open up the index.js file and go to the getTimeLeft function.
Where you currently have:
hours: parseInt(until / (60 * 60), 10) % 24,
Replace it with:
hours: parseInt(until / (60 * 60), 10) % 24 + parseInt(until / (60 * 60 * 24), 10) * 24,
This will add 24 hours to your hour count for every day value that would've displayed within the day box. Note that you'll need to remodify this line every time your node modules update as it will reset it back to the original function.
from react-native-countdown-component.
thanks, I know this solution, if everyone in svn / git needs to modify the node modules, Hope the author can accept #64 pull requests
from react-native-countdown-component.
@Simacho239 how do you do it when you only need to display in minutes?
For example instead of 03:00:00 hours i want to display 180:00 minutes
from react-native-countdown-component.
Related Issues (20)
- Maximum update depth exceeded HOT 2
- Peer dependency error
- until does not update when state.property is changed - stays one update behind. HOT 6
- SOLVED accuracy
- Dead?
- How can I get the value of the elapsed time to save it in localstorge? HOT 1
- onFinish not work on 00 HOT 1
- EventEmitter needs update HOT 1
- Deprecated AppState.removeEventListener on react v0.70 HOT 9
- Error -4049
- Android Timer decrease with in seconds (very fastly) HOT 5
- AppState.removeEventListener() is deprecated which is used in the index.js file
- EventEmitter.removeListener('appStateDidChange', ...): Method has been deprecated. Please instead use `remove()` on the subscription returned by `EventEmitter.addListener`. HOT 2
- Save yourself a headache: HOT 2
- undefined is not a function (AppState.removeEventListener('change', this._handleAppStateChange) HOT 3
- Volunteer as Maintainer
- maintaining this component
- 'removeEventListener' removed in recent versions of react-native. Replaced with '.remove()'
- [iOS] Timer corrupts when app goes in back ground and comes to foreground HOT 2
- Maximum update depth exceeded. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-countdown-component.