Current month not being selected on default
-
On upgrade to version 1.3.6 I found that when displaying the full calendar without specifying a “month” and a “yr” as parameters on the URL, the current month (in this case October) is not being selected in the pull down list of months and the current year (in this case 2015) is not being selected in the pull down list of years. Instead, the pull down list came up with a month of January and a year of 1985.
I traced the problem down to changes made to the functions calendar_month_comparison and the calendar_year_comparison. Both have a line of code as follows:
if (isset($get_year) && isset($get_month))
I replaced this code in both functions with:
if (($get_year!='') && ($get_month!=''))
and it seemed to fix the problem.
I think the ISSET function isn’t working the way you expected it to when using the string variables “$get_year” and “$get_month”. No doubt there is a more elegant solution but my PHP skills are rudimentary.
- The topic ‘Current month not being selected on default’ is closed to new replies.