fix calendar javascript work