I'm setting up a calendar and I'm going to make a calendar. I need to know how many days in the month and what day of the week is the 1st of each month. How to do this with PHP?
I'm setting up a calendar and I'm going to make a calendar. I need to know how many days in the month and what day of the week is the 1st of each month. How to do this with PHP?
This may not completely answer your question, but I used the Full Calendar library once for dates and it worked very well.
It's a jQuery library of a Google Calendar-style interface, all with drag-and-drop , has demo of what can be done with it.
To process the data generated by callback functions type:
$('#calendar').fullCalendar({
dayClick: function() {
alert('a day has been clicked!');
}
});
Based on a template they posted I created this simple calendar:
<?php
$month = 8;
$year = 2014;
$days_in_month = date('t',mktime(0,0,0,$month,1,$year));
for($list_day = 1; $list_day <= $days_in_month; $list_day++):
echo "<div id=\"calendario_dia\">$list_day</div>";
endfor;
?>
It needs to be modified to be "usable", it's just the foundation I needed!