Update calendar.js

bug fixes on multiple calendar