{"action":"created","issue":{"url":"https://api.github.com/repos/Paul-DS/bootstrap-year-calendar/issues/14","repository_url":"https://api.github.com/repos/Paul-DS/bootstrap-year-calendar","labels_url":"https://api.github.com/repos/Paul-DS/bootstrap-year-calendar/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/Paul-DS/bootstrap-year-calendar/issues/14/comments","events_url":"https://api.github.com/repos/Paul-DS/bootstrap-year-calendar/issues/14/events","html_url":"https://github.com/Paul-DS/bootstrap-year-calendar/issues/14","id":146229063,"number":14,"title":"Support Timestamps and handle times which are not exactly 0:00 o´clock","user":{"login":"MeMeMax","id":6450415,"avatar_url":"https://avatars.githubusercontent.com/u/6450415?v=3","gravatar_id":"","url":"https://api.github.com/users/MeMeMax","html_url":"https://github.com/MeMeMax","followers_url":"https://api.github.com/users/MeMeMax/followers","following_url":"https://api.github.com/users/MeMeMax/following{/other_user}","gists_url":"https://api.github.com/users/MeMeMax/gists{/gist_id}","starred_url":"https://api.github.com/users/MeMeMax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeMeMax/subscriptions","organizations_url":"https://api.github.com/users/MeMeMax/orgs","repos_url":"https://api.github.com/users/MeMeMax/repos","events_url":"https://api.github.com/users/MeMeMax/events{/privacy}","received_events_url":"https://api.github.com/users/MeMeMax/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-06T08:14:52Z","updated_at":"2016-05-20T22:21:22Z","closed_at":null,"body":"Hi, I adjusted this Script to accept Timestamps and handle times which are not exactly 0:00 o´clock:\r\n\r\nHere is the part of my _renderDataSource:\r\n\r\n\tvar firstDate = new Date(_this.options.startYear, month, 1);\r\n\tvar lastDate = new Date(_this.options.startYear, month + 1, 0);\r\n\r\n\tif((_this.options.minDate == null || lastDate >= _this.options.minDate) && (_this.options.maxDate == null || firstDate <= _this.options.maxDate))\r\n\t{\r\n\t\tvar monthData = [];\r\n\r\n\t\tfor(var i in _this.options.dataSource) {\r\n\t\t\tif(!(_this.options.dataSource[i].startDate instanceof Date)){\r\n\t\t\t\t_this.options.dataSource[i].startDate = new Date(_this.options.dataSource[i].startDate);\r\n\t\t\t}\r\n\t\t\tif(!(_this.options.dataSource[i].endDate instanceof Date)){\r\n\t\t\t\t_this.options.dataSource[i].endDate = new Date(_this.options.dataSource[i].endDate);\r\n\t\t\t}\r\n\t\t\tif(!(_this.options.dataSource[i].startDate > lastDate) || (_this.options.dataSource[i].endDate < firstDate)) {\r\n\t\t\t\tmonthData.push(_this.options.dataSource[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(monthData.length > 0) {\r\n\t\t\t$(this).find('.day-content').each(function() {\r\n\t\t\t\tvar currentDate = new Date(_this.options.startYear, month, $(this).text());\r\n\t\t\t\tvar nextDate = new Date(currentDate.getTime());\r\n\t\t\t\tnextDate = new Date(nextDate.setDate(currentDate.getDate()+1));\r\n\t\t\t\t\r\n\t\t\t\tvar dayData = [];\r\n\t\t\t\t\r\n\t\t\t\tif((_this.options.minDate == null || currentDate >= _this.options.minDate) && (_this.options.maxDate == null || currentDate <= _this.options.maxDate))\r\n\t\t\t\t{\r\n\t\t\t\t\tfor(var i in monthData) {\r\n\t\t\t\t\t\tif(monthData[i].startDate >= currentDate && monthData[i].endDate <= nextDate) {\r\n\t\t\t\t\t\t\tdayData.push(monthData[i]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(dayData.length > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t_this._renderDataSourceDay($(this), currentDate, dayData);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\r\ngetEvents has to be adjusted as well. Else you will not get popovers:\r\n\r\n\tgetEvents: function(date) {\r\n\t\tvar events = [];\r\n\t\tvar nextDate = new Date(date.getTime());\r\n\t\tnextDate = new Date(nextDate.setDate(date.getDate()+1));\r\n\t\tif(this.options.dataSource && date) {\r\n\t\t\tfor(var i in this.options.dataSource) {\r\n\t\t\t\tif(this.options.dataSource[i].startDate >= date && this.options.dataSource[i].endDate <= nextDate) {\r\n\t\t\t\t\tevents.push(this.options.dataSource[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn events;\r\n\t},"},"comment":{"url":"https://api.github.com/repos/Paul-DS/bootstrap-year-calendar/issues/comments/220732260","html_url":"https://github.com/Paul-DS/bootstrap-year-calendar/issues/14#issuecomment-220732260","issue_url":"https://api.github.com/repos/Paul-DS/bootstrap-year-calendar/issues/14","id":220732260,"user":{"login":"anup756","id":7366031,"avatar_url":"https://avatars.githubusercontent.com/u/7366031?v=3","gravatar_id":"","url":"https://api.github.com/users/anup756","html_url":"https://github.com/anup756","followers_url":"https://api.github.com/users/anup756/followers","following_url":"https://api.github.com/users/anup756/following{/other_user}","gists_url":"https://api.github.com/users/anup756/gists{/gist_id}","starred_url":"https://api.github.com/users/anup756/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anup756/subscriptions","organizations_url":"https://api.github.com/users/anup756/orgs","repos_url":"https://api.github.com/users/anup756/repos","events_url":"https://api.github.com/users/anup756/events{/privacy}","received_events_url":"https://api.github.com/users/anup756/received_events","type":"User","site_admin":false},"created_at":"2016-05-20T22:21:22Z","updated_at":"2016-05-20T22:21:22Z","body":"@Paul-DS Not a Problem!\r\n\r\n![capturess](https://cloud.githubusercontent.com/assets/7366031/15443559/e65355e8-1eae-11e6-95a2-73413ada9347.PNG)\r\n\r\n![capturessaa](https://cloud.githubusercontent.com/assets/7366031/15443594/31ac1d04-1eaf-11e6-8ca3-fe7a0fa27c6e.PNG)\r\n\r\nAlso, I have been working on adding a time field for Events and it's working.. I am currently using Bootstrap-datetimepicker for this along with datepicker but I just want to use one(datetimepicker which is a fork of datepicker). If you (or anyone) could help me that would be great if not I'll figure it out somehow :)"}}
{"actor":{"display_login":"anup756"}}