Oh, so many views but no one to help
I've found this code online, and altered it to fit my needs. Just c/p it in the php block
/* date settings */
$month = (int) (isset($_GET['month']) ? $_GET['month'] : date('m'));
$year = (int) (isset($_GET['year']) ? $_GET['year'] : date('Y'));
/* select month control */
$select_month_control ='<select name="month" id="action=calendar;month">';
for($x = 1; $x <= 12; $x++) {
$select_month_control.= '<option value="'.$x.'"'.($x != $month ? '' : ' selected="selected"').'>'.date('F',mktime(0,0,0,$x,1,$year)).'</option>';
}
$select_month_control.= '</select>';
/* select year control */
$year_range = 7;
$select_year_control = '<select name="year" id="year">';
for($x = ($year-floor($year_range/2)); $x <= ($year+floor($year_range/2)); $x++) {
$select_year_control.= '<option value="'.$x.'"'.($x != $year ? '' : ' selected="selected"').'>'.$x.'</option>';
}
$select_year_control.= '</select>';
/* "previous month" control */
$previous_month_link = '<a href="?action=calendar;month='.($month != 1 ? $month - 1 : 12).'&year='.($month != 1 ? $year : $year - 1).'" class="control"><< Previous Month</a>';
/* "next month" control */
$next_month_link = '<a href="?action=calendar;month='.($month != 12 ? $month + 1 : 1).'&year='.($month != 12 ? $year : $year + 1).'" class="control">Next Month >></a>';
/* bringing the controls together */
$controls ='<center><form method="get"> '.$previous_month_link.' '.$select_month_control.$select_year_control.' <input type="submit" name="submit" value="Go" /> '.$next_month_link.' </form></center>';
echo $controls;
previous/next function works great, but the pick a month is missing a part "
?action=calendar;" and it returns just an empty page. Can someone help me with this one?