Fixed cal javascript autofill bug