$('.calendar').on('click', '.day', function () {
var day = $(this).data('date');
console.log(day);
});
var $btn = $('#toggle'),
$popup = $('.popup'),
$test = $('.test'),
visible = false;
function togglePopup () {
visible = !visible;
$test.toggleClass('hidden', visible);
$popup.toggleClass('hidden', !visible);
}
$btn.on('click', togglePopup);