Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I get the clicked date? #758

Open
lloyrdmart opened this issue Oct 7, 2018 · 1 comment
Open

How can I get the clicked date? #758

lloyrdmart opened this issue Oct 7, 2018 · 1 comment

Comments

@lloyrdmart
Copy link

How can i get the date that was clicked? I am new to the web dev world. Please teach me

@tonspeed
Copy link

I've made own workaround, not so pretty, but works:
modyfy template day.html, add:

<%= cal.options.day %>
before this line:
<%= cal._hour(i, l) %>

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);
});
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants