Fix js error

Made changes with ref from https://github.com/tarruda/bootstrap-datetimepicker/pull/127/files