minor optimization of calendar ajax