Closed tonspeed closed 3 years ago
I've made own workaround, not so pretty, but works: modyfy template day.html, add:
<div style="display:none;" class="dzien"><%= cal.options.day %></div>
before this line:
<div class="span1 col-xs-1"><b><%= cal._hour(i, l) %></b></div>
in calendar:
onAfterViewLoad: function(view) {
$(\'.page-header h3\').text(this.getTitle());
$(\'.btn-group button\').removeClass(\'active\');
$(\'button[data-calendar-view="\' + view + \'"]\').addClass(\'active\');
//-------------------------------------------------------------------------------
$(\'#cal-day-box #cal-day-panel #cal-day-panel-hour .cal-day-hour .row-fluid.cal-day-hour-part\').unbind(\'click\');
$(\'#cal-day-box #cal-day-panel #cal-day-panel-hour .cal-day-hour .row-fluid.cal-day-hour-part\').click( function() {
//When click on hour in the day view
var date = $(this).children(\'.dzien\').html();
var time = $(this).children(\'.span1\').children(\'b\').html();
NewEvent(date, time);
});
},
Good.
Hi, //When click on hour in the day view var date = $(this).data(\'calendar-day\'); console.log(date);
date is undefined, what's wrong, how to get date from this view?