Resolved JS error with datetimepicker