Update calendar.js

Fix function momentDate(date) to accept moment object.