{"action":"closed","issue":{"url":"https://api.github.com/repos/dangrossman/bootstrap-daterangepicker/issues/722","labels_url":"https://api.github.com/repos/dangrossman/bootstrap-daterangepicker/issues/722/labels{/name}","comments_url":"https://api.github.com/repos/dangrossman/bootstrap-daterangepicker/issues/722/comments","events_url":"https://api.github.com/repos/dangrossman/bootstrap-daterangepicker/issues/722/events","html_url":"https://github.com/dangrossman/bootstrap-daterangepicker/issues/722","id":96375422,"number":722,"title":"Possible regression in 1.3.22 release around \"in-range\" styling","user":{"login":"swanson","id":56947,"avatar_url":"https://avatars.githubusercontent.com/u/56947?v=3","gravatar_id":"","url":"https://api.github.com/users/swanson","html_url":"https://github.com/swanson","followers_url":"https://api.github.com/users/swanson/followers","following_url":"https://api.github.com/users/swanson/following{/other_user}","gists_url":"https://api.github.com/users/swanson/gists{/gist_id}","starred_url":"https://api.github.com/users/swanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swanson/subscriptions","organizations_url":"https://api.github.com/users/swanson/orgs","repos_url":"https://api.github.com/users/swanson/repos","events_url":"https://api.github.com/users/swanson/events{/privacy}","received_events_url":"https://api.github.com/users/swanson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-07-21T17:46:11Z","updated_at":"2015-08-21T14:26:43Z","closed_at":"2015-08-21T14:26:43Z","body":"```js\r\n$('#reportrange').daterangepicker({\r\n   timezone: 0,\r\n   startDate: moment.utc('2015-07-15').startOf('day'),\r\n   endDate: moment.utc('2015-07-20').endOf('day')\r\n});\r\n```\r\n\r\n# Previous behavior\r\nhttp://jsfiddle.net/wda3kpwm/ Test case for v1.3.21\r\n\r\n![image](https://cloud.githubusercontent.com/assets/56947/8807921/78807d7a-2fad-11e5-8528-023edd069c18.png)\r\n\r\n\r\n# New behavior\r\nhttp://jsfiddle.net/zqkq07ga/ Test case for v1.3.23\r\n\r\nNotice that July 14 (outside the range) on the right calendar is styled as if it were included in the range.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/56947/8807898/5ae83c6c-2fad-11e5-8cac-43fe8a92178b.png)\r\n\r\n\r\nI believe that [this commit](https://github.com/dangrossman/bootstrap-daterangepicker/commit/61ac1dccd183711c5167f8ed2060aa4f29afee16) introduced the change in behavior.\r\n\r\nWhen checking if the current cell is included in the range (see [this conditional](https://github.com/dangrossman/bootstrap-daterangepicker/blob/v1.3.23/daterangepicker.js#L1178-L1182) in `renderCalendars`), the start and end date are in UTC, while the date associated with the table cell is not set to the user-defined timezone. This causes the comparison to incorrectly mark a date outside the range as `in-range`.\r\n\r\nWe've forked this repo locally and reverted https://github.com/dangrossman/bootstrap-daterangepicker/commit/61ac1dccd183711c5167f8ed2060aa4f29afee16 as a temporary work-around. I don't know the full context of the behavior that this commit attempted to address, but the comment of \"possible fix\" above the change leads me to believe that this was perhaps not a long-term solution.\r\n\r\nCan you confirm if this is a regression? Or intended behavior?\r\n"}}