Datepicker was used in main.js without the jquery ui being loaded (killing js everywhere except on event edit page), this should fix it by checking the jquery ui is loaded before calling the pugin.
Check that the datepicker module is loaded

Signed-off-by: Emilien Kenler <hello@emilienkenler.com>