Fix checkCalender API & DB Func