Daylight Saving Cause an issue on jQuery UI datepicker on Firefox

夙愿已清 提交于 2019-12-19 04:18:11

问题


I'm having an issue with jQuery UI datepicker on Firefox.

I am working on a system based on schedules for a future date and I noticed that 2016-03-31 is Thursday, which is correct, but 2016-04-01 is also Thursday when it should be Friday!

The issue appeared on both the desktop and mobile version of Firefox, but not on other browsers.

The interesting thing is, it happens in the demos on https://jqueryui.com/datepicker/ too!

Screenshot on https://jqueryui.com/datepicker/ for March 2016:

Screenshot on https://jqueryui.com/datepicker/ for April 2016:

As you can see, all dates on April have the wrong day of week. It is shifted by one day.

Screenshot on https://jqueryui.com/datepicker/#multiple-calendars for March to May 2016:

As you can see, it's wrong in April but correct in March and May.

And, in response to a comment below, yes, I'm in Jordan, Asia. So?


回答1:


The issue is related to my country because:

Per @Pang comments,

Jordan is having some Daylight Saving Time changes on 2016-04-01 and the change is right at 00:00:00! Apparently, Jordan does not have 00:00:00 on 2016-04-01 so Firefox is confused and thinks that 00:00:00 is still Thursday.

And the problem is fixed on the 1st of April automatically :)



来源:https://stackoverflow.com/questions/36245848/daylight-saving-cause-an-issue-on-jquery-ui-datepicker-on-firefox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!