connect calendar to db
fix calendar allday bug