Add & fix functions of calendar