Is there a way I can get the day I click to show? For example, on the calendar, if I click on the 9th, my input would show that date, if I click on the 10th, that date will show, etc.
+2
A:
Check out the docs: http://arshaw.com/fullcalendar/docs/mouse/dayClick/
$('#calendar').fullCalendar({
dayClick: function(date, allDay, jsEvent, view) {
if (allDay) {
alert('Clicked on the entire day: ' + date);
}else{
alert('Clicked on the slot: ' + date);
}
alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);
alert('Current view: ' + view.name);
// change the day's background color just for fun
$(this).css('background-color', 'red');
}
});
sdolan
2010-08-16 18:04:51
@ sdolan -- thank you, I was able to get the date from day click with your suggestion.
hersh
2010-08-16 18:37:01
@hersh: You're welcome. The `fullcalendar` docs are wonderful for a single person open source project (and any project for that matter.)
sdolan
2010-08-16 18:47:52