longbill / jquery-date-range-picker

A jQuery plugin that allows user to select a date range
MIT License
1.12k stars 578 forks source link

facing problem with tool tip count #298

Open jpsiet opened 7 years ago

jpsiet commented 7 years ago

From subject:

"when i am selecting 7th Nov. and then going to 4 Nov. then tool tip saying total count 5 days, but actually it is 4 days. This problem i can see in the sample also. I have attached screen shot for reference. "

timestamp_problem

holtkamp commented 7 years ago

Mmm, maybe a locale / timezone thing? Where are you located and at what time did you perform the experiment?

Here in GMT+1 it works at 22:30

screen shot 2016-11-08 at 22 30 55

jpsiet commented 7 years ago

Hi,

I am applying from Boston USA, it is happening from 7th Nov 2016. it was working fine as usual from last 7 month.

Thanks and Regards Jitendra Pratap Singh

On Tue, Nov 8, 2016 at 4:32 PM, Menno Holtkamp notifications@github.com wrote:

Mmm, maybe a locale / timezone thing? Where are you located and at what time did you perform the experiment?

Here in GMT+1 it works at 22:30

[image: screen shot 2016-11-08 at 22 30 55] https://cloud.githubusercontent.com/assets/776405/20118024/44e511d8-a603-11e6-9895-8358d7834c47.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/longbill/jquery-date-range-picker/issues/298#issuecomment-259266252, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ-Ml1t629RpJUaGAMW2QF7m32R4hgubks5q8OqAgaJpZM4Ks0QQ .

holtkamp commented 7 years ago

Well, I think it is a locale / timezone thingie, so maybe you can check again a few times per day and note the results + time you check.

For example, this is a screenshot of an 'availability' system, every Monday and Sunday the place is closed:

screen shot 2016-11-09 at 10 11 11

But at GTM+01 at 00:30, it displays as follows (note all days/availability has shifted one day):

screen shot 2016-11-09 at 00 18 32

So if you can provide some additional test-data, we might be able to pinpoint the problem.

jpsiet commented 7 years ago

Thanks for your valuable time, really appreciate for the same. but i checked many times, but the same problem is coming, i am not sure but day light saving....... stuff can effect. I debug the library but didn't any find any thing which can cause this problem. This problem is only coming if i am including 7th Nov. in date range calculation .

holtkamp commented 7 years ago

This problem is only coming if i am including 7th Nov. in date range calculation .

Only when including November 7th 2016? Mmm, that is really strange...

jpsiet commented 7 years ago

daterange_issue Hi,

After debug i found that when ever time attribute in library for calculating tool tip in dayHovering function is going as normal date not with time ( Sun Nov 06 2016 00:00:00 GMT-0400 --- 1478404800000, Mon Nov 07 2016 00:00:00 GMT-0500 -- 1478494800000), then the problem is coming. when it is working fine the correct data ( 1478443509915 Sun Nov 06 2016 14:45:09 1478529909915 Mon Nov 07 2016 14:45:09 ) . do you have any idea why this is coming like this? I notice if time is there it is working fine for other date. Please let me know if you need any thing else, in order to understand the issue). Because i can replicate the same in the sample code too. I have attached screen shot for reference.

jpsiet commented 7 years ago

Hi Admin,

After some research we found that in this plugin day light saving is creating a problem.. i checked for last 3-4 year and found problem. Do you have configuration.. or any code which i can customize. Please let me know ..