Update calendar.js

This is to fix the issue #170.