Tak widze jeden kalendarz. Tu chodzi o wydarzenia jakie sie w nim wyswietlaja.
Standardowo, co pozwala wyswietlic wszystkie i sa one pokazane w kalendarzu. W mojej wersji zawsze pokazuje sie tylko pierwsze z bazy, chodz po mojemu pętla też powinna zwracać więcej niż 1.
<script>
$(document).ready(function() {
$('#calendar').fullCalendar({
defaultDate: '2015-02-12',
editable: true,
eventLimit: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2015-02-01'
},
{
title: 'Long Event',
start: '2015-02-07',
},
{
id: 999,
title: 'Repeating Event',
start: '2015-02-09T16:00:00'
},
{
id: 999,
title: 'Repeating Event',
start: '2015-02-16T16:00:00'
},
{
title: 'Conference',
start: '2015-02-11',
},
{
title: 'Meeting',
start: '2015-02-12T10:30:00',
end: '2015-02-12T12:30:00' },
{
title: 'Lunch',
start: '2015-02-12T12:00:00'
},
{
title: 'Meeting',
start: '2015-02-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2015-02-12T17:30:00'
},
{
title: 'Dinner',
start: '2015-02-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2015-02-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2015-02-28'
}
]
});
});
</script>
Ew probowalem w ten sposob, ale efekt podobny.
<script type="text/javascript">
<?php
$query = "SELECT ".$prefix."kalendarium.* FROM ".$prefix."kalendarium WHERE kalendarium_aktywny = '1'";
echo" $(document).ready(function() {
$('#my-next-button').click(function() {
$('#calendar').fullCalendar('next');
});
$('#calendar').fullCalendar({
weekends: true,
header: {
left: 'prev,next today',
center: 'title',
right: 'month,basicWeek,basicDay'
},
defaultDate: '".$data."',
editable: false,
eventLimit: true,
events: [
{
title: '".$r['kalendarium_wydarzenie']."',
start: '".$r['kalendarium_dataStart']."',
end: '".$r['kalendarium_dataKoniec']."'
}
]
});
});
";
}
}
?>
</script>
Robie coś nie tak?