{"action":"opened","number":63,"pull_request":{"url":"https://api.github.com/repos/MakingSense/moment-datepicker/pulls/63","id":34988251,"html_url":"https://github.com/MakingSense/moment-datepicker/pull/63","diff_url":"https://github.com/MakingSense/moment-datepicker/pull/63.diff","patch_url":"https://github.com/MakingSense/moment-datepicker/pull/63.patch","issue_url":"https://api.github.com/repos/MakingSense/moment-datepicker/issues/63","number":63,"state":"open","locked":false,"title":"viewport support (i.e. proper datepicker placement inside elements with fixed size and overflow: scroll)","user":{"login":"Happi-cat","id":744254,"avatar_url":"https://avatars.githubusercontent.com/u/744254?v=3","gravatar_id":"","url":"https://api.github.com/users/Happi-cat","html_url":"https://github.com/Happi-cat","followers_url":"https://api.github.com/users/Happi-cat/followers","following_url":"https://api.github.com/users/Happi-cat/following{/other_user}","gists_url":"https://api.github.com/users/Happi-cat/gists{/gist_id}","starred_url":"https://api.github.com/users/Happi-cat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Happi-cat/subscriptions","organizations_url":"https://api.github.com/users/Happi-cat/orgs","repos_url":"https://api.github.com/users/Happi-cat/repos","events_url":"https://api.github.com/users/Happi-cat/events{/privacy}","received_events_url":"https://api.github.com/users/Happi-cat/received_events","type":"User","site_admin":false},"body":"# The problem\r\n\r\nWe have next html code (example):\r\n\r\n```html\r\n<div id=\"viewport\" style=\"overflow: scroll; width: 100px; height: 100px\">\r\n   <!-- ... a lot of content here .. -->\r\n  <input type=\"text\" class=\"span2\" data-bind=\"datepicker: birthdayFormat, datepickerOptions: { dataType: 'format', format: 'D/M/YY' }\">\r\n   <!-- ... a lot of content here .. -->\r\n</div>\r\n```\r\n\r\nIf you click on date field, datepicker will open in wrong place as it uses only input offset and ignores scroll position.\r\n\r\n# Solution\r\n\r\nWe can specify viewport element  as a container and use it for calculating correct offset for datepicker.\r\n*(This is what I've added)*","created_at":"2015-05-08T08:09:43Z","updated_at":"2015-05-08T08:09:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MakingSense/moment-datepicker/pulls/63/commits","review_comments_url":"https://api.github.com/repos/MakingSense/moment-datepicker/pulls/63/comments","review_comment_url":"https://api.github.com/repos/MakingSense/moment-datepicker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MakingSense/moment-datepicker/issues/63/comments","statuses_url":"https://api.github.com/repos/MakingSense/moment-datepicker/statuses/888e8a6c05dfb6e9a070afc16a885435830dd962","head":{"label":"Happi-cat:viewport-support","ref":"viewport-support","sha":"888e8a6c05dfb6e9a070afc16a885435830dd962","user":{"login":"Happi-cat","id":744254,"avatar_url":"https://avatars.githubusercontent.com/u/744254?v=3","gravatar_id":"","url":"https://api.github.com/users/Happi-cat","html_url":"https://github.com/Happi-cat","followers_url":"https://api.github.com/users/Happi-cat/followers","following_url":"https://api.github.com/users/Happi-cat/following{/other_user}","gists_url":"https://api.github.com/users/Happi-cat/gists{/gist_id}","starred_url":"https://api.github.com/users/Happi-cat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Happi-cat/subscriptions","organizations_url":"https://api.github.com/users/Happi-cat/orgs","repos_url":"https://api.github.com/users/Happi-cat/repos","events_url":"https://api.github.com/users/Happi-cat/events{/privacy}","received_events_url":"https://api.github.com/users/Happi-cat/received_events","type":"User","site_admin":false},"repo":{"id":35266143,"name":"moment-datepicker","full_name":"Happi-cat/moment-datepicker","owner":{"login":"Happi-cat","id":744254,"avatar_url":"https://avatars.githubusercontent.com/u/744254?v=3","gravatar_id":"","url":"https://api.github.com/users/Happi-cat","html_url":"https://github.com/Happi-cat","followers_url":"https://api.github.com/users/Happi-cat/followers","following_url":"https://api.github.com/users/Happi-cat/following{/other_user}","gists_url":"https://api.github.com/users/Happi-cat/gists{/gist_id}","starred_url":"https://api.github.com/users/Happi-cat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Happi-cat/subscriptions","organizations_url":"https://api.github.com/users/Happi-cat/orgs","repos_url":"https://api.github.com/users/Happi-cat/repos","events_url":"https://api.github.com/users/Happi-cat/events{/privacy}","received_events_url":"https://api.github.com/users/Happi-cat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Happi-cat/moment-datepicker","description":"The best bootstrap datepicker!","fork":true,"url":"https://api.github.com/repos/Happi-cat/moment-datepicker","forks_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/forks","keys_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/teams","hooks_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/hooks","issue_events_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/issues/events{/number}","events_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/events","assignees_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/assignees{/user}","branches_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/branches{/branch}","tags_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/tags","blobs_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/git/refs{/sha}","trees_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/statuses/{sha}","languages_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/languages","stargazers_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/stargazers","contributors_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/contributors","subscribers_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/subscribers","subscription_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/subscription","commits_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/commits{/sha}","git_commits_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/git/commits{/sha}","comments_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/comments{/number}","issue_comment_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/issues/comments{/number}","contents_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/contents/{+path}","compare_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/merges","archive_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/downloads","issues_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/issues{/number}","pulls_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/pulls{/number}","milestones_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/milestones{/number}","notifications_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/labels{/name}","releases_url":"https://api.github.com/repos/Happi-cat/moment-datepicker/releases{/id}","created_at":"2015-05-08T07:54:36Z","updated_at":"2015-05-08T07:54:37Z","pushed_at":"2015-05-08T07:58:44Z","git_url":"git://github.com/Happi-cat/moment-datepicker.git","ssh_url":"git@github.com:Happi-cat/moment-datepicker.git","clone_url":"https://github.com/Happi-cat/moment-datepicker.git","svn_url":"https://github.com/Happi-cat/moment-datepicker","homepage":null,"size":5650,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"MakingSense:master","ref":"master","sha":"f4716a9ec4c9da6cda4bec40d67cc178a90bdf67","user":{"login":"MakingSense","id":2685575,"avatar_url":"https://avatars.githubusercontent.com/u/2685575?v=3","gravatar_id":"","url":"https://api.github.com/users/MakingSense","html_url":"https://github.com/MakingSense","followers_url":"https://api.github.com/users/MakingSense/followers","following_url":"https://api.github.com/users/MakingSense/following{/other_user}","gists_url":"https://api.github.com/users/MakingSense/gists{/gist_id}","starred_url":"https://api.github.com/users/MakingSense/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MakingSense/subscriptions","organizations_url":"https://api.github.com/users/MakingSense/orgs","repos_url":"https://api.github.com/users/MakingSense/repos","events_url":"https://api.github.com/users/MakingSense/events{/privacy}","received_events_url":"https://api.github.com/users/MakingSense/received_events","type":"Organization","site_admin":false},"repo":{"id":6479854,"name":"moment-datepicker","full_name":"MakingSense/moment-datepicker","owner":{"login":"MakingSense","id":2685575,"avatar_url":"https://avatars.githubusercontent.com/u/2685575?v=3","gravatar_id":"","url":"https://api.github.com/users/MakingSense","html_url":"https://github.com/MakingSense","followers_url":"https://api.github.com/users/MakingSense/followers","following_url":"https://api.github.com/users/MakingSense/following{/other_user}","gists_url":"https://api.github.com/users/MakingSense/gists{/gist_id}","starred_url":"https://api.github.com/users/MakingSense/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MakingSense/subscriptions","organizations_url":"https://api.github.com/users/MakingSense/orgs","repos_url":"https://api.github.com/users/MakingSense/repos","events_url":"https://api.github.com/users/MakingSense/events{/privacy}","received_events_url":"https://api.github.com/users/MakingSense/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MakingSense/moment-datepicker","description":"The best bootstrap datepicker!","fork":false,"url":"https://api.github.com/repos/MakingSense/moment-datepicker","forks_url":"https://api.github.com/repos/MakingSense/moment-datepicker/forks","keys_url":"https://api.github.com/repos/MakingSense/moment-datepicker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MakingSense/moment-datepicker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MakingSense/moment-datepicker/teams","hooks_url":"https://api.github.com/repos/MakingSense/moment-datepicker/hooks","issue_events_url":"https://api.github.com/repos/MakingSense/moment-datepicker/issues/events{/number}","events_url":"https://api.github.com/repos/MakingSense/moment-datepicker/events","assignees_url":"https://api.github.com/repos/MakingSense/moment-datepicker/assignees{/user}","branches_url":"https://api.github.com/repos/MakingSense/moment-datepicker/branches{/branch}","tags_url":"https://api.github.com/repos/MakingSense/moment-datepicker/tags","blobs_url":"https://api.github.com/repos/MakingSense/moment-datepicker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MakingSense/moment-datepicker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MakingSense/moment-datepicker/git/refs{/sha}","trees_url":"https://api.github.com/repos/MakingSense/moment-datepicker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MakingSense/moment-datepicker/statuses/{sha}","languages_url":"https://api.github.com/repos/MakingSense/moment-datepicker/languages","stargazers_url":"https://api.github.com/repos/MakingSense/moment-datepicker/stargazers","contributors_url":"https://api.github.com/repos/MakingSense/moment-datepicker/contributors","subscribers_url":"https://api.github.com/repos/MakingSense/moment-datepicker/subscribers","subscription_url":"https://api.github.com/repos/MakingSense/moment-datepicker/subscription","commits_url":"https://api.github.com/repos/MakingSense/moment-datepicker/commits{/sha}","git_commits_url":"https://api.github.com/repos/MakingSense/moment-datepicker/git/commits{/sha}","comments_url":"https://api.github.com/repos/MakingSense/moment-datepicker/comments{/number}","issue_comment_url":"https://api.github.com/repos/MakingSense/moment-datepicker/issues/comments{/number}","contents_url":"https://api.github.com/repos/MakingSense/moment-datepicker/contents/{+path}","compare_url":"https://api.github.com/repos/MakingSense/moment-datepicker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MakingSense/moment-datepicker/merges","archive_url":"https://api.github.com/repos/MakingSense/moment-datepicker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MakingSense/moment-datepicker/downloads","issues_url":"https://api.github.com/repos/MakingSense/moment-datepicker/issues{/number}","pulls_url":"https://api.github.com/repos/MakingSense/moment-datepicker/pulls{/number}","milestones_url":"https://api.github.com/repos/MakingSense/moment-datepicker/milestones{/number}","notifications_url":"https://api.github.com/repos/MakingSense/moment-datepicker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MakingSense/moment-datepicker/labels{/name}","releases_url":"https://api.github.com/repos/MakingSense/moment-datepicker/releases{/id}","created_at":"2012-10-31T19:58:25Z","updated_at":"2015-05-07T11:08:59Z","pushed_at":"2015-03-23T11:24:38Z","git_url":"git://github.com/MakingSense/moment-datepicker.git","ssh_url":"git@github.com:MakingSense/moment-datepicker.git","clone_url":"https://github.com/MakingSense/moment-datepicker.git","svn_url":"https://github.com/MakingSense/moment-datepicker","homepage":null,"size":5650,"stargazers_count":80,"watchers_count":80,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":56,"mirror_url":null,"open_issues_count":33,"forks":56,"open_issues":33,"watchers":80,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MakingSense/moment-datepicker/pulls/63"},"html":{"href":"https://github.com/MakingSense/moment-datepicker/pull/63"},"issue":{"href":"https://api.github.com/repos/MakingSense/moment-datepicker/issues/63"},"comments":{"href":"https://api.github.com/repos/MakingSense/moment-datepicker/issues/63/comments"},"review_comments":{"href":"https://api.github.com/repos/MakingSense/moment-datepicker/pulls/63/comments"},"review_comment":{"href":"https://api.github.com/repos/MakingSense/moment-datepicker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MakingSense/moment-datepicker/pulls/63/commits"},"statuses":{"href":"https://api.github.com/repos/MakingSense/moment-datepicker/statuses/888e8a6c05dfb6e9a070afc16a885435830dd962"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":8,"deletions":2,"changed_files":1}}