Calendar not gets num entries from database