asmaoui / jquery-datepicker

Automatically exported from code.google.com/p/jquery-datepicker
0 stars 0 forks source link

duplicate 28 date in March any year #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
check March 28 each year

What is the expected output? What do you see instead?
there are 2 28 dates in March

Please provide a URL to a page displaying the problem.
any demo on your datepicker page

What version of the datepicker are you using? On what operating system? And
Which Browser?
version 2 - any os any browser

Please provide any additional information below.
crytical error

Original issue reported on code.google.com by bstdevel...@gmail.com on 20 Jan 2009 at 8:53

GoogleCodeExporter commented 9 years ago
Thanks for the bug report. This has something to do with timezones and daylight
savings but I have been unable to track it down on my computer (I just tried 
and all
of the examples on my site are working fine for me). Can you please help me to 
fix
this by giving me some more information...

What operating system are you using?

What timezone are you in? And what location?

Some people reported this issue in October as well but I couldn't replicate 
with any
timezone I tried. Hopefully with some further details from you I will be able 
to fix
the bug,

Thanks,

Kelvin :)

Original comment by kelvin.l...@gmail.com on 21 Jan 2009 at 1:05

GoogleCodeExporter commented 9 years ago
Hello,

I am using XP - the problem appears in firefox and google chrome - i will check 
ie 
too.

I am based in Bucharest, Romania

Thank you.

Original comment by bstdevel...@gmail.com on 22 Jan 2009 at 1:46

GoogleCodeExporter commented 9 years ago
Hi,

I am also running Windows XP. I changed my system time zone to "(GMT+02:00) 
Athens,
Bucharest, Istanbul" and tried with and without "Automatically adjust clock for
daylight saving changes" ticked. But it all worked fine for me (in IE 7 and 
Firefox 3).

I tested by visiting this page: 

http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePicker.html

Are you still having the problem? Can you think of anything else on your system 
which
might be different to mine?

Thanks for helping me to isolate this bug,

Cheers,

Kelvin :)

Original comment by kelvin.l...@gmail.com on 24 Jan 2009 at 8:22

GoogleCodeExporter commented 9 years ago
Hi Kelvin,

I think it's somekind of javascript bug - it's not because of your code.

The problem is when running XP - I have XP sp3 with GMT+02:00 Bucharest. For 
all other 
GMT+02:00 everything is running fine. The bug is present at least in IE, 
Firefox and Google 
Chrome.

I solved the problem in the following way:
in date.js from
-----------------------------------------
add("addDays", function(num) {
        this.setDate(this.getDate() + num);
        return this;
    });
-----------------------------------------
to
-----------------------------------------
add("addDays", function(num) {
                old = this.getDate();
        this.setDate(this.getDate() + num);
                new = this.getDate();
                if(old==new) this.setDate(this.getDate() + num);
        return this;
    });
-----------------------------------------

Original comment by bstdevel...@gmail.com on 25 Jan 2009 at 9:13

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for the feedback. Can you please do another test for me? Since I can't 
see the
bug on my system I can't test the solution!

Can you try the following code instead:

add("addDays", function(num) {
    this.setDate(this.getTime() + (num*86400000) );
    return this;
});

Thanks,

Kelvin :)

Original comment by kelvin.l...@gmail.com on 25 Jan 2009 at 6:01

GoogleCodeExporter commented 9 years ago
Hi,

Sorry, there was a typo in the last example... Can you try the attached date.js
instead of the one you edited and tell me if you have the problem please?

Thanks,

Kelvin :)

Original comment by kelvin.l...@gmail.com on 14 Feb 2009 at 8:08

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I had the same problem, but for April 2009,when I replaced the date.js file the
problem was fixed.

P.S.:
My timezone is Cairo,+2 GMT.

Original comment by e.han...@gmail.com on 1 Apr 2009 at 2:25

GoogleCodeExporter commented 9 years ago
Issue 61 has been merged into this issue.

Original comment by kelvin.l...@gmail.com on 2 Apr 2009 at 12:08

GoogleCodeExporter commented 9 years ago
Thanks for letting me know that the new date.js fixed the issue. It was a hard 
one
for me to debug because I couldn't reproduce it whatever I set my timezone 
too... I
have now updated the date.js in the repository.

Original comment by kelvin.l...@gmail.com on 2 Apr 2009 at 12:14

GoogleCodeExporter commented 9 years ago
The new date.js file fixed the replicated date in April, but I found out that 
there
is a replicated date in September after adding it. I don't understand what the
problem could be??!!!!!!!!

Original comment by e.han...@gmail.com on 2 Apr 2009 at 12:15

GoogleCodeExporter commented 9 years ago
D'oh! I don't understand either! It's definitely related to daylight savings in
certain locales... I'm reopening the ticket and will search for a more robust 
solution,

Thanks,

Kelvin :)

Original comment by kelvin.l...@gmail.com on 3 Apr 2009 at 5:36

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi Kelvin, I have the same problem also with the new file, but in October 25. 
I'm in
Italy!
thanks
Marco

Original comment by kmar...@gmail.com on 4 Apr 2009 at 10:05

GoogleCodeExporter commented 9 years ago
Thanks for the info Marco... I'll keep trying to find a solution...

Original comment by kelvin.l...@gmail.com on 4 Apr 2009 at 4:52

GoogleCodeExporter commented 9 years ago
Issue 39 has been merged into this issue.

Original comment by kelvin.l...@gmail.com on 5 Apr 2009 at 7:26

GoogleCodeExporter commented 9 years ago
Hi Marco,

In r70 I implemented a fix for this issue (hopefully). Can you please test the 
pages
on my site and see if you are still having any problems?

Thanks,

Kelvin :)

Original comment by kelvin.l...@gmail.com on 5 Apr 2009 at 7:27

GoogleCodeExporter commented 9 years ago
Issue 4 has been merged into this issue.

Original comment by kelvin.l...@gmail.com on 5 Apr 2009 at 7:45

GoogleCodeExporter commented 9 years ago
The problem became worse now.April 2009 from the day 23 to the end of the month
writes 23. April 2010 from the day 22 to the end of the month writes 22. April 
2011
from the day 28 to the end of the month writes 28. May 2011 writes only April's 
days
24, 25, 26, 27 then 28 to the end month, but I haven't checked any further.

Original comment by e.han...@gmail.com on 7 Apr 2009 at 10:01

GoogleCodeExporter commented 9 years ago
Hi Kelvin, the problem has been fixed now, from my pc, many thanks.Marco

Original comment by kmar...@gmail.com on 7 Apr 2009 at 7:40

GoogleCodeExporter commented 9 years ago
Glad to hear it is working for you Marco :)

But sad to hear it's not for you e.hany! So you are seeing those problems on the
examples on my site? Can you try clearing your cache and viewing the examples 
again
please? Also, what browser are you using?

Thanks,

Kelvin :)

Original comment by kelvin.l...@gmail.com on 8 Apr 2009 at 5:19

GoogleCodeExporter commented 9 years ago
The problem persists on both Firefox & IE

Original comment by e.han...@gmail.com on 21 Apr 2009 at 8:59

GoogleCodeExporter commented 9 years ago
Does the fix suggested in issue 70 help you?

Original comment by kelvin.l...@gmail.com on 29 Apr 2009 at 8:49

GoogleCodeExporter commented 9 years ago
Hi Kelvin, I have the same problem here.
October from the day 17 to the end of the month
writes 17
I have tried fix with the path of issue 70 that you have indicated but 
unfortunately
this fix don't solve the Issue 22 :(

I'm in Brazil, running Win XP SP3 with a timezone GMT-03:00.
The problem occurs on Firefox 3.0, 3.5 and IE 7.0.

my best regards,

Camilo

Original comment by camilo.a...@gmail.com on 13 Jul 2009 at 5:35

Attachments:

GoogleCodeExporter commented 9 years ago
Please download the latest js file from the googlecode svn repository. I just 
made
some changes in r80 which should fix this problem...

Let me know if it works,

Kelvin :)

Original comment by kelvin.l...@gmail.com on 15 Jul 2009 at 3:27

GoogleCodeExporter commented 9 years ago
Issue 93 has been merged into this issue.

Original comment by kelvin.l...@gmail.com on 15 Jul 2009 at 3:29

GoogleCodeExporter commented 9 years ago
Issue 70 has been merged into this issue.

Original comment by kelvin.l...@gmail.com on 15 Jul 2009 at 3:29

GoogleCodeExporter commented 9 years ago
Hello Kelvin! I guess that this fix works for me! Thanks a lot! 

cheers,

Camilo

Original comment by camilo.a...@gmail.com on 15 Jul 2009 at 4:09

GoogleCodeExporter commented 9 years ago
Kelvin,
This fix helped with the rendering but the datepicker selects the wrong date 
based on
the daylight savings (DST) settings. IE: Here in Brazil DST starts at midnight 
Oct18,
when I select Oct18 on the datepicker it automatically switches to Oct17.

Maybe besides adding the hours to fix when you render the calendar you might 
need to
do the same when you get it from the .data of each cell.

I'm having a hard time trying to pin this down though.

Original comment by felipe.l...@gmail.com on 6 Oct 2009 at 3:07

GoogleCodeExporter commented 9 years ago
Hi again,
I found a way to fix it. I had to change the fromString method in date.js and 
switch:
var d = new Date('01/01/1977');
to
var d = new Date('01/01/1977').addHours(12);

I don't know if this is the best fix possible but it did the trick.

Original comment by felipe.l...@gmail.com on 6 Oct 2009 at 3:17

GoogleCodeExporter commented 9 years ago
Thanks for the info felipe - can I just confirm that you were having trouble 
with the
latest date picker code from svn?

Original comment by kelvin.l...@gmail.com on 6 Oct 2009 at 3:29

GoogleCodeExporter commented 9 years ago
Yes, I used the latest version from the svn. It fixed the problem with the 
double
rendering of some dates when they were at the DST changing period.

Original comment by felipe.l...@gmail.com on 6 Oct 2009 at 4:27

GoogleCodeExporter commented 9 years ago
I had the same problem too, at first when the timezone (or server time was 
GMT+0) and it duplicates 25 of oct 
and then i tested again by changing my local timezone to where i live now (GMT 
+7) there was no problem, so 
to fix this: 

Change the line :
add("addDays", function(num) {  
        this.setTime(this.getTime() + (num*86400000) );
        return this;
    });

to

add("addDays", function(num) {
        this.setDate(this.getDate() + num);
        return this;
    });

I don't know why but it does the trick

Cheers

Original comment by andy.wid...@gmail.com on 7 Oct 2009 at 6:20

GoogleCodeExporter commented 9 years ago
Hi Kelvin,

I had the same bug (for Oct 25th). The solution of andy.widodo fixed the bug.

I am using Ubuntu 9.04, Firefox 3.0.14, Epiphany 2.26.1. It's the same on Mac 
OS X
10.6.1, Firefox 3.5.3.

My timezone is GMT+2.

Original comment by mihai.mo...@gmail.com on 23 Oct 2009 at 8:59

Attachments:

GoogleCodeExporter commented 9 years ago
Hi all,

I had the same issue, but it was November 1st repeated instead of Oct 25th. I 
assume
that is due to the different date that we get daylight savings time in the US.  
andy.widodo's sol'n worked for me as well FTW!

Original comment by mr.j...@gmail.com on 27 Oct 2009 at 4:01

GoogleCodeExporter commented 9 years ago
Andy you saved my day! Thanks! 

Original comment by ron.gerr...@gmail.com on 29 Oct 2009 at 11:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Having the same issue for November 1st being repeated, which corresponds with 
the our DST change, but the 
bigger issue is that all my days are now a number off.

Sat - 31st (Oct)
Sun - 1st
Mon - 1st
Tue - 2nd
Wed - 3rd

Original comment by bgmccol...@gmail.com on 3 Nov 2009 at 7:56

GoogleCodeExporter commented 9 years ago
two November 1st for me too - andy.widodo's solution worked for me...

tested on Windows XP, Windows 7, and Mac OS - Firefox, IE, Safari - All in EST.

Original comment by lewayott...@gmail.com on 19 Nov 2009 at 4:51

GoogleCodeExporter commented 9 years ago
Issue 126 has been merged into this issue.

Original comment by kelvin.l...@gmail.com on 23 Nov 2009 at 12:58

GoogleCodeExporter commented 9 years ago
Ditto for me with the November issue (Sun November 1st, Mon November 1st) on 
Windows
XP SP2 (EST) in Firefox + IE7 but, oddly, not in IE6.

andy.widodo's solution did the trick!

Original comment by mm...@mindspring.com on 24 Nov 2009 at 6:18

GoogleCodeExporter commented 9 years ago
i tryied andy.widodo's solution : didn't work.
very strange

i'm attaching a picture

firefox 3, xp sp3, bucharest +2

i tryied both with:
add("addDays", function(num) {
        //this.setDate(this.getDate() + num);
        this.setTime(this.getTime() + (num*86400000) );
        return this;
    });
AND
add("addDays", function(num) {
        this.setDate(this.getDate() + num);
        //this.setTime(this.getTime() + (num*86400000) );
        return this;
    });

Original comment by munteanu...@gmail.com on 30 Mar 2010 at 9:17

Attachments:

GoogleCodeExporter commented 9 years ago
Issue 191 has been merged into this issue.

Original comment by kelvin.l...@gmail.com on 4 Apr 2010 at 5:14

GoogleCodeExporter commented 9 years ago
I re downloaded the datepicker from your website and this has fixed the issue 
for me
in a Australian Timezone

Original comment by tdm...@gmail.com on 8 Apr 2010 at 2:02

GoogleCodeExporter commented 9 years ago
there is still a bug in your date picker kelvin. i tried to insert 29 February 
2012,
but it'll show 01 March 2012....
can u fixed it? coz i used your date picker too. thanks.... :)

Original comment by fulus.in...@gmail.com on 15 Apr 2010 at 2:12

GoogleCodeExporter commented 9 years ago
there is still a bug in your date picker kelvin. i tried to insert 29 February 
2012,
but it'll show 01 March 2012....
can u fixed it? coz i used your date picker too. thanks.... :)

Original comment by fulus.in...@gmail.com on 15 Apr 2010 at 2:17

GoogleCodeExporter commented 9 years ago
I have replicated this issue and as it doesn't appear to be related to the 
above I
have created issue 195 to look into it. Please star that issue to be notified of
updates...

Original comment by kelvin.l...@gmail.com on 15 Apr 2010 at 9:52

GoogleCodeExporter commented 9 years ago
Hey guys, this is a simple one to fix:

It's because of Daylight Savings. You need to basically set the Hour of the 
date to 2am when looping through the days of the month.

Original comment by joshpy...@gmail.com on 6 Nov 2010 at 12:41

GoogleCodeExporter commented 9 years ago
Issue 249 has been merged into this issue.

Original comment by kelvin.l...@gmail.com on 8 Nov 2010 at 8:07

GoogleCodeExporter commented 9 years ago
what's the state of the art to fix this horrible bug? ;)

Original comment by rvelo...@gmail.com on 8 Nov 2010 at 8:45