Made changes based on github.com/smalot/bootstrap-datetimepicker/pull/266 to fix issue with modal window reloading