{"action":"created","issue":{"url":"https://api.github.com/repos/angular-slider/angularjs-slider/issues/237","labels_url":"https://api.github.com/repos/angular-slider/angularjs-slider/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/angular-slider/angularjs-slider/issues/237/comments","events_url":"https://api.github.com/repos/angular-slider/angularjs-slider/issues/237/events","html_url":"https://github.com/angular-slider/angularjs-slider/issues/237","id":129457381,"number":237,"title":"Slider value is chaned after programatical modification.","user":{"login":"Filson14","id":4540538,"avatar_url":"https://avatars.githubusercontent.com/u/4540538?v=3","gravatar_id":"","url":"https://api.github.com/users/Filson14","html_url":"https://github.com/Filson14","followers_url":"https://api.github.com/users/Filson14/followers","following_url":"https://api.github.com/users/Filson14/following{/other_user}","gists_url":"https://api.github.com/users/Filson14/gists{/gist_id}","starred_url":"https://api.github.com/users/Filson14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Filson14/subscriptions","organizations_url":"https://api.github.com/users/Filson14/orgs","repos_url":"https://api.github.com/users/Filson14/repos","events_url":"https://api.github.com/users/Filson14/events{/privacy}","received_events_url":"https://api.github.com/users/Filson14/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-28T13:46:41Z","updated_at":"2016-01-28T14:50:08Z","closed_at":null,"body":"Hi!\r\nI am really confused with this issue. I use slider to present some time frames. Values are in milliseconds since 1970-01-01 and I use translate function to parse this for slider labels.\r\n\r\nThe problem is that when I set slider.value it changes itself right after that. For example, i choose from datepicker some day, want to set midnight on the slider but slider.value is one hour later. In some cases it adds two days and one hour instead. I tried almost everything to figure it out and debug. Even using $scope.$watch on slider.value and manually delete one hour, I can see in console that the value is subtracted and right after that increased by an hour.\r\n\r\nI hope You can figure out the answer or at least a clue. Is there something in angularjs-slider source code that changes that? Maybe I missed sth."},"comment":{"url":"https://api.github.com/repos/angular-slider/angularjs-slider/issues/comments/176221671","html_url":"https://github.com/angular-slider/angularjs-slider/issues/237#issuecomment-176221671","issue_url":"https://api.github.com/repos/angular-slider/angularjs-slider/issues/237","id":176221671,"user":{"login":"Filson14","id":4540538,"avatar_url":"https://avatars.githubusercontent.com/u/4540538?v=3","gravatar_id":"","url":"https://api.github.com/users/Filson14","html_url":"https://github.com/Filson14","followers_url":"https://api.github.com/users/Filson14/followers","following_url":"https://api.github.com/users/Filson14/following{/other_user}","gists_url":"https://api.github.com/users/Filson14/gists{/gist_id}","starred_url":"https://api.github.com/users/Filson14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Filson14/subscriptions","organizations_url":"https://api.github.com/users/Filson14/orgs","repos_url":"https://api.github.com/users/Filson14/repos","events_url":"https://api.github.com/users/Filson14/events{/privacy}","received_events_url":"https://api.github.com/users/Filson14/received_events","type":"User","site_admin":false},"created_at":"2016-01-28T14:50:08Z","updated_at":"2016-01-28T14:50:08Z","body":"**Liam-Ryan**, I looked at that issue before, tried to use enforceStep and Range with different configs. I'm affraid it would be hard to create in a minute a jsfiddle which fully presents the problem, i'll try.\r\n\r\nMy slider config:\r\nvm.slider = {\r\n      value: 0,\r\n      parts: 10,\r\n      options: {\r\n        floor: 0,\r\n        ceil: 604800000,\r\n        translate: function(value) {\r\n          return formatterService.formatDateTime(moment(value, 'x').format());\r\n        },\r\n        //readOnly: true,\r\n        enforceRange: false,\r\n        enforceStep: false,\r\n        draggableRangeOnly: true,\r\n        onEnd: function(id, value, high) {\r\n          setExplorePeriod(moment(value, 'x'), moment(high, 'x'));\r\n          vm.isTimeFrames = true;\r\n        }\r\n      }\r\n    };\r\n\r\nI dynamically set step for the slider, and also slider.value and slider.high. The main goal with slider here is to do the presentation."}}