Revert "missed some other duplicated JS in my last commit"

This reverts commit 0c8bd90d5ed8c49e18d76c8e70bb50e163cc5a6a.
Revert "fixed datepicker javascript, removed some erroneous script tags"

This reverts commit 568d5f34119f6819fe2242c32e7da07587c02b09.