Radhika Radhika - 3 years ago 139
jQuery Question

delete one day total events usign onclick function in fullcalendar

var day='';

$(".fc-day-number").before("<img src="+base_url+"assets/images/del.jpg style='height:10px;width:10px' name='date' id='data-date' onClick=afunction();>");


function afunction()

$('.fc-day-number').click(function() {
// Get current day
day = parseInt($(this).html());


var projects =<?php echo $schedule; ?>;

In this
function I cant get that day number.

Answer Source

I would suggest you not use to the classes to target the element.

You can directly use the fullCalendar events to get the entire date from it.

Here's the link.

   dayClick: function(date, jsEvent, view) {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download