update calendar.php

added if condition on line 71 to assign value to $this->value