Update calendar.js

Some small fix on edit an existing calendar. The old active variable checked the length of an checkbox ... so the return value was "2". Make this sense? Here's the fix!