Comments (12)
It looks like a problem caused by moment-timezone, it return a wrong timezone and change your time by mistake when initial. By the way, it seems works well for me on Safari but broken on Chrome. I'll check it more carefully to see what really happened.
from react-times.
I found these issues:
But after I update moment & moment-timezone to the newest version, moment timezone still works wrong. So I publish a new version V2.2.6 to fix this problem occasional: If user give TimePicker an exactly time props, such as "15:15", then I won't moment to guess user's timezone when initial.
Now new version V2.2.6 is already published, so you can update your dependency to check it out. THX!
from react-times.
So strange. It worked well for me so I can't reappearance this bug. But by looking your gif, it really looks like the bug which happened before v2.2.7. Can you reinstall this package, or clean browser cache? Cause it's only a little change from v2.2.6 to v2.2.7, and maybe node module system or browser cached the required file.
It's only a guess, and I'm still debugging to check if any other bug exist.
from react-times.
Sorry to reply you late. I had some personal trivia to deal some days ago, and now I'm coming back to fix this issue. First thank you so much for your enthusiasm to help me find these bugs. It's my fault that now find these problems, and now I make some changes for this module:
- If you send time props for react-times component, then when initialize, it won't use time zone to render current time.
- When user chose a time, component will not use time zone either (Cause users know what time they have chosen, so there is need to guess their time zone and recheck the time).
- So now, only by sending a timezone props can make component use time zone when render time.
Now I have made a new version 2.2.8 to publish these changes. Would you like to update your dependency and check again? Thanks!
from react-times.
Seems a bug. Could you tell me which theme are you using? The Material Theme(default) or the Classic one? And you are using 24 hours mode, right? Thanks for your feedback!
from react-times.
I'm using classic theme and using this css
import 'react-times/css/classic/default.css';
P.S
constructor() {
super();
this.state = {
time: '15:15'
};
}
handleTimeChange(time) {
this.setState({ time });
}
render() {
const { time } = this.state;
return (
<div className="form-group">
{time}
<TimePicker
time={time}
timeMode="24"
theme="classic"
onTimeChange={this.handleTimeChange.bind(this)} />
</div>
);
}
Oh, and on initial load, it seems to be adding an extra hour from the time I've written in the state?
from react-times.
Thank you, that seems to have fixed the issue for the insertion of the initial time. However, selecting 1:00 still renders 13:00.
from react-times.
@vemuez
I see. Thank you! It's same problem as the initial one, and I forget to fix it. Now I have published new version V2.2.7 and fixed this problem.
from react-times.
Unfortunately, after installing 2.2.7, 1:00 still redirects to 13:00. I would like to contribute too, tried cloning the repository to reproduce the bug and find the problem, but i can't get the branch to work. It's after clicking 1:00am, where timeMode is set to 24, it displays 13:00 instead of 1:00 😢 .
This applies to all the AM times from 1:00am to 11:30am.
- 1:00 -> 13:00
- 2:00 -> 14:00
...
... - 11:00 -> 23:00
It converts 24hr AM times to 24hr PM times. I am using the classic theme, and 24 for timeMode.
Here's a quick demo
from react-times.
Yea, it is as you say. I had already removed the node_modules, upgraded from 2.2.6 to 2.2.7. But it turns out the browser had cached it. Don't know why i didn't think about that sooner. Thank you for the help 😄
from react-times.
Well, I've encountered, one more bug in this change actually. 12:00 and 12:30 changes to 00:00 and 00:30.
from react-times.
No worries @ecmadao, Thank you for the time to look at this. It works now 😄.
from react-times.
Related Issues (20)
- Styles not work with css modules HOT 1
- Warning: Can't call setState (or forceUpdate) on an unmounted component.
- Calendar picker with similar aesthetic HOT 2
- Check the render method of `TwentyFourHoursMode`. HOT 3
- Costumize pointer color HOT 1
- Perssistent mode HOT 1
- In 12-hour mode (material theme), hour should read "12" instead of "00" HOT 3
- Update the active styles on dropdown
- Classic theme is not responsive.
- Keyboard input for accessibility?
- Pointers always point to default time even after time updated
- In 24 hour mode clock head shows incorrect time
- Incorrect time on some hour HOT 1
- Disable intervals
- onFocusChange not called when timepicker popup closed. HOT 2
- Disabled component HOT 3
- Center screen on mobile HOT 2
- [Storybook] example for default time not working
- PickerPoint position issue HOT 1
- Does not work with latest version of react? 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-times.