bootstrap-year-calendar
bootstrap-year-calendar copied to clipboard
2nd Saturday in October is duplicated in Firefox
2nd Saturday in October is duplicated in Firefox v48.0.2
Duplicate of #54
And it's not happening on 50+ Version of firefox
Try with other version and tell us what happen but on the field of #54
I upgraded to version 52 and still continues to duplicate
Mmm that's weird this could be because of your current timezone right now I'm on GMT -5, I've saw this same problem on Eonasdan Datetime Picker before on this issue , it's because something on JavaScript can you please give us your current timezone or can change yours to +00:00 or GMT -5 like mine and see if this happens too
Good luck!
Sorry for the delay in responding. My time zone is GMT-0300 (Brazil's official time).
I changed to GMT +00: 00 and GMT -05: 00, actually stopped duplicating.
Thank you
Ok great so the problem is actually with JavaScript... this is weird and it's a problem for clients beacuse the date is taking out from the browser, so I'm not sure on how actually do a workaround, maybe @Paul-DS do you know a workaround for this or have you saw this before?
This is really the first time I came across this. The datepicker that mentioned tbm has the same problem.
I'll search and see if I can find a solution.
in _renderBody, i've notices that in some iterations of days, it's adding hours to the currentDate. I'm not sure why, but i'm truncating the currentDate after every iteration.
currentDate.setDate(currentDate.getDate() + 1); currentDate.setHours(0, 0, 0, 0);
It works, but i'm not sure of the real problem.
I have fixed:
After line 235: currentDate.setHours(1); After line 237: lastDate.setHours(1); And after line 287: currentDate.setHours(1);
I'll try to send a pullrequest to fix this.
@djulianm thanks, this worked for me. My problem have been with November 30
@djulianm for fixed in my case:
After line 235:
currentDate.setHours(1);
After line 237:
lastDate.setHours(1);
And after line 287:
currentDate.setHours(1);
**lastDate.setHours(1);**