{"action":"created","issue":{"url":"https://api.github.com/repos/dangrossman/bootstrap-daterangepicker/issues/678","labels_url":"https://api.github.com/repos/dangrossman/bootstrap-daterangepicker/issues/678/labels{/name}","comments_url":"https://api.github.com/repos/dangrossman/bootstrap-daterangepicker/issues/678/comments","events_url":"https://api.github.com/repos/dangrossman/bootstrap-daterangepicker/issues/678/events","html_url":"https://github.com/dangrossman/bootstrap-daterangepicker/issues/678","id":89377688,"number":678,"title":"datepicker hidden after event","user":{"login":"ron0","id":3662038,"avatar_url":"https://avatars.githubusercontent.com/u/3662038?v=3","gravatar_id":"","url":"https://api.github.com/users/ron0","html_url":"https://github.com/ron0","followers_url":"https://api.github.com/users/ron0/followers","following_url":"https://api.github.com/users/ron0/following{/other_user}","gists_url":"https://api.github.com/users/ron0/gists{/gist_id}","starred_url":"https://api.github.com/users/ron0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ron0/subscriptions","organizations_url":"https://api.github.com/users/ron0/orgs","repos_url":"https://api.github.com/users/ron0/repos","events_url":"https://api.github.com/users/ron0/events{/privacy}","received_events_url":"https://api.github.com/users/ron0/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-18T19:31:37Z","updated_at":"2015-06-18T20:03:09Z","closed_at":"2015-06-18T20:03:08Z","body":"Great work, Dan!\r\n\r\nI'm starting with your All Options example.  After receiving an event and setting the value of the span in your sample callback, the datepicker div display gets set to none.\r\n\r\n    $('#reportrange span').html(moment().subtract(29, 'days').format('MMMM D, YYYY') + ' - ' + moment().format('MMMM D, YYYY'));\r\n \r\n    $('#reportrange').daterangepicker({\r\n        format: 'MM/DD/YYYY',\r\n        startDate: moment().subtract(29, 'days'),\r\n        endDate: moment(),\r\n        dateLimit: { days: 60 },\r\n        showDropdowns: true,\r\n        showWeekNumbers: true,\r\n        timePicker: false,\r\n        timePickerIncrement: 1,\r\n        timePicker12Hour: true,\r\n        ranges: {\r\n           'Today': [moment(), moment()],\r\n           'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],\r\n           'Last 7 Days': [moment().subtract(6, 'days'), moment()],\r\n           'Last 30 Days': [moment().subtract(29, 'days'), moment()],\r\n           'This Month': [moment().startOf('month'), moment().endOf('month')],\r\n           'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]\r\n        },\r\n        opens: 'left',\r\n        drops: 'down',\r\n        buttonClasses: ['btn', 'btn-sm'],\r\n        applyClass: 'btn-primary',\r\n        cancelClass: 'btn-default',\r\n        separator: ' to ',\r\n        locale: {\r\n            applyLabel: 'Submit',\r\n            cancelLabel: 'All',\r\n            fromLabel: 'From',\r\n            toLabel: 'To',\r\n            customRangeLabel: 'Custom',\r\n            daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'],\r\n            monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\r\n            firstDay: 1\r\n        }\r\n    }, function(start, end, label) {\r\n        console.log(start.toISOString(), end.toISOString(), label);\r\n        $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));\r\n        start.startOf('day');\r\n        end.endOf('day');\r\n        $('#startDate').val(start.format(\"MM/DD/YYYY hh:mm a\"));\r\n        $('#endDate').val(end.format(\"MM/DD/YYYY hh:mm a\"));\r\n        $('#reportrange').css('display', 'inline-block');\r\n        console.log('passed change');\r\n    });\r\n\r\n    $('#reportrange').on('cancel.daterangepicker', function(ev, picker) {\r\n    \t  //do something, like clearing an input\r\n    \t  $('#reportrange').val('');\r\n    \t});\r\n\r\n    $(document).ready(function() {\r\n    \tvar drp = $('#reportrange').data('daterangepicker');\r\n        $('#startDate').val(drp.startDate.format(\"MM/DD/YYYY hh:mm a\"));\r\n        $('#endDate').val(drp.endDate.format(\"MM/DD/YYYY hh:mm a\"));    \t\r\n    });\r\n"},"comment":{"url":"https://api.github.com/repos/dangrossman/bootstrap-daterangepicker/issues/comments/113274201","html_url":"https://github.com/dangrossman/bootstrap-daterangepicker/issues/678#issuecomment-113274201","issue_url":"https://api.github.com/repos/dangrossman/bootstrap-daterangepicker/issues/678","id":113274201,"user":{"login":"dangrossman","id":407706,"avatar_url":"https://avatars.githubusercontent.com/u/407706?v=3","gravatar_id":"","url":"https://api.github.com/users/dangrossman","html_url":"https://github.com/dangrossman","followers_url":"https://api.github.com/users/dangrossman/followers","following_url":"https://api.github.com/users/dangrossman/following{/other_user}","gists_url":"https://api.github.com/users/dangrossman/gists{/gist_id}","starred_url":"https://api.github.com/users/dangrossman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dangrossman/subscriptions","organizations_url":"https://api.github.com/users/dangrossman/orgs","repos_url":"https://api.github.com/users/dangrossman/repos","events_url":"https://api.github.com/users/dangrossman/events{/privacy}","received_events_url":"https://api.github.com/users/dangrossman/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T20:03:08Z","updated_at":"2015-06-18T20:03:08Z","body":"The date range picker is hidden after you've selected your date range. That's the expected behavior."}}