Comments (35)
@caarlos0 thanks!
Just to be clear, the linked site (eyecon.ro) isn't mine, but the original author's. I've just made improvements on his original plugin -- he hasn't responded to my comments on his site, though, so I would imagine his site is using a very old version of the plugin.
I can't replicate the bug on Chrome 18/WinXP -- can you give a specific list of steps you take to get it to show like that? I've just gone through February 2010 - February 2020 with the arrows, and all months displayed as expected.
As for adding the plugin to your project, it's licensed under the Apache 2.0 license. If that license is compatible with your project, I have no objection to it.
from bootstrap-datepicker.
Ok man!
I'll try to port it to GWT, and will add credits for you :)
Thanks :) 👍
from bootstrap-datepicker.
Apparently, the bug is something in Date#setDate, the bug disappear if you replace it by #setTime:
diff --git a/js/bootstrap-datepicker.js b/js/bootstrap-datepicker.js
index d11b2ed..5b2f848 100644
--- a/js/bootstrap-datepicker.js
+++ b/js/bootstrap-datepicker.js
@@ -276,7 +276,8 @@
if (prevMonth.getDay() == this.weekEnd) {
html.push('</tr>');
}
- prevMonth.setDate(prevMonth.getDate()+1);
+
+ prevMonth.setTime(prevMonth.getTime() + 86400000);
}
this.picker.find('.datepicker-days tbody').empty().append(html.join(''));
var currentYear = this.date.getFullYear();
from bootstrap-datepicker.
@everton were you able to replicate this? Can you outline the steps you took to do so? I'd appreciate the info, thanks!
from bootstrap-datepicker.
The bug happen everywhere, I just take the plugin into my app, go for the October/2012 and have the exactly same thing that the print screen above.
The same bug occurs into Firefox 9+, Chrome and IE8...
I really don't understand difficult to reproduce the bug, all members of my team (5 developers) has the exactly same bug, into Windows, Linux and Mac environments.
from bootstrap-datepicker.
Could it be a timezone issue? Whats your timezone?
On Fri, Jun 1, 2012 at 2:20 PM, Everton J. Carpes <
[email protected]
wrote:
The bug happen everywhere, I just take the plugin into my app, go for the
October/2012 and have the exactly same thing that the print screen above.The same bug occurs into Firefox 9+, Chrome and IE8...
I really don't understand difficult to reproduce the bug, all members of
my team (5 developers) has the exactly same bug, into Windows, Linux and
Mac environments.
Reply to this email directly or view it on GitHub:
Atenciosamente,
Carlos Alexandro Becker
https://profiles.google.com/caarlos0
from bootstrap-datepicker.
We are at Brazil, our timezone is: GMT-3
from bootstrap-datepicker.
I'm at brazil too, and was expecting this bug too. (also GMT-3).
Take a look here: http://gwtbootstrap.github.com/#datepicker
It could be the locale..
On Fri, Jun 1, 2012 at 2:32 PM, Everton J. Carpes <
[email protected]
wrote:
We are at Brazil, our timezone is: GMT-3
Reply to this email directly or view it on GitHub:
Atenciosamente,
Carlos Alexandro Becker
https://profiles.google.com/caarlos0
from bootstrap-datepicker.
Aha! After setting my system timezone to America/Asuncion, I see the bug -- there's a duplicate October 6, 2012. Coincidentally, this is when Asuncion jumps ahead 1hr, so it looks like a DST bug (though it seems it doesn't affect all TZs).
Now that I'm finally able to replicate it, I can look at building tests and a solution for it. Thanks @everton and @caarlos0!
from bootstrap-datepicker.
You're welcome :D
If you need help, please let me know. I'll glad to help =)
On Fri, Jun 1, 2012 at 3:19 PM, Andrew Rowls <
[email protected]
wrote:
Aha! After setting my system timezone to America/Asuncion, I see the bug
-- there's a duplicate October 6, 2012. Coincidentally, this is when
Asuncion jumps ahead 1hr, so it looks
like a DST bug (though it seems it doesn't affect all TZs).Now that I'm finally able to replicate it, I can look at building tests
and a solution for it. Thanks @everton and @caarlos0!
Reply to this email directly or view it on GitHub:
Atenciosamente,
Carlos Alexandro Becker
https://profiles.google.com/caarlos0
from bootstrap-datepicker.
+1
from bootstrap-datepicker.
is it fixed?
from bootstrap-datepicker.
hey @everton , I do your fix in my local, and it works for october/2012, but break february/2013 :)
from bootstrap-datepicker.
actually, it breaks all february's
from bootstrap-datepicker.
No, I haven't done anything on this yet -- the past few weekends have been too low on free time.
@caarlos0 if you want to give it a shot, that'd be cool. If you can come up with some tests alongside any fixes, that'd be even better :)
from bootstrap-datepicker.
I trying something here... but I dont have many exp with handling dates in
JS... I also tried using setUTCDate, without success..
On Fri, Jun 22, 2012 at 10:13 PM, Andrew Rowls <
[email protected]
wrote:
No, I haven't done anything on this yet -- the past few weekends have been
too low on free time.@caarlos0 if you want to give it a shot, that'd be cool. If you can come
up with some tests alongside any fixes, that'd be even better :)
Reply to this email directly or view it on GitHub:
Atenciosamente,
Carlos Alexandro Becker
https://profiles.google.com/caarlos0
from bootstrap-datepicker.
Fixed with ba6da0a
Unfortunately, there's not any way (that I can see) to build a unit test for this particular behavior. We can mock current date, but not client/system timezone!
from bootstrap-datepicker.
thanks, tonight I'll take a look.
from bootstrap-datepicker.
Didn't work in GMT-3. Same bug.
In addiction, oct/27 goes to the sunday column.
from bootstrap-datepicker.
I've just tried three more GMT-3 TZs, none have any problems with October. Are you sure you're using latest master?
from bootstrap-datepicker.
Yes, take a look at this fiddle: http://jsfiddle.net/caarlos0/p8Xnk/
Thanks.
from bootstrap-datepicker.
I'm unable to replicate that result in that fiddle. I may try some other timezones later, but all the ones I've tried so far have behaved properly. What a pain :/
from bootstrap-datepicker.
:/
OK man, let me know if you need help to test or something...
thanks :)
from bootstrap-datepicker.
I have a sugstão and worked here, instead of:
prevDate = prevMonth.getDate();
prevMonth.setDate(prevMonth.getDate()+1);
put:
prevDate = prevMonth.getDate();
prevMonth.setHours(1, 0, 0, 0);
prevMonth.setDate(prevMonth.getDate()+1);
The months of October and February were right.
from bootstrap-datepicker.
The "correct" solution to this bug is likely to move all date handling to UTC dates. Which probably should be done anyway :)
from bootstrap-datepicker.
Yeah, good idea, use UTC should fix this...
On Thu, Jun 28, 2012 at 5:40 PM, Andrew Rowls <
[email protected]
wrote:
The "correct" solution to this bug is likely to move all date handling to
UTC dates. Which probably should be done anyway :)
Reply to this email directly or view it on GitHub:
Atenciosamente,
Carlos Alexandro Becker
https://profiles.google.com/caarlos0
from bootstrap-datepicker.
also, this datepicker works great: http://stefangabos.ro/jquery/zebra-datepicker/
maybe you can take a look at the code :D
from bootstrap-datepicker.
from bootstrap-datepicker.
@edgardmessias if you're suggesting integration with momentjs, that's already been brought up and rejected in #24
from bootstrap-datepicker.
I thought of studying the computation of the sum of dates this plugin.
Sorry for the English, but I'm from Brazil and I'm still studying.
from bootstrap-datepicker.
Ah, ok. Well, first I'd like to simply move to UTC dates, and see if that fixes a lot of problems. If we still have issues, then we'll start looking at how various libraries do it.
from bootstrap-datepicker.
I've reverted the last sad attempt to fix this DST bug and pushed a patch that moves everything to UTC dates. Testing would be appreciated.
This fixes it for the TZs I saw it in, so I'm once again closing this issue until somebody finds another edge case ;)
from bootstrap-datepicker.
Thanks, I'll test it later ,:)
Em 13/08/2012 14:53, "Andrew Rowls" [email protected] escreveu:
I've reverted the last sad attempt to fix this DST bug and pushed a patch
that moves everything to UTC dates. Testing would be appreciated.This fixes it for the TZs I saw it in, so I'm once again closing this
issue until somebody finds another edge case ;)—
Reply to this email directly or view it on GitHubhttps://github.com//issues/20#issuecomment-7700270.
from bootstrap-datepicker.
Derp, somehow I forgot to push the changes. Pushed now, my bad.
from bootstrap-datepicker.
Hi everybody. Is this bug fixed?
from bootstrap-datepicker.
Related Issues (20)
- warning on dependencies using composer
- select Monday dates and add event
- Show date, time and month in one div
- lack of inline layout responsiveness
- Can we get a release? HOT 3
- defaultViewDate modify my input variable
- input-daterange and css alignment problem with bootstrap HOT 1
- Datepicker no longer confined to element HOT 4
- how to disable tooltip in range date option HOT 7
- Disable toggle on Multi-select HOT 1
- The default text in date input is not showing on mobile HOT 1
- Datepicker freezes when using the setDates method
- Change in date format from dd/mm/yyyy to yyyy-mm-dd in filter HOT 1
- Content of beforeShowDay option
- month/year drop-downs?
- clear button clears date, but copies old value to other empty date in input-range
- Display only available options for years mode HOT 1
- Configuration Option to set the time zone to use on the client. HOT 1
- _1dot1dot1dot1.WarpAccount
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 bootstrap-datepicker.