Datepicker refactored; now always submits the same format while showing/entering is done in the format defined by the locale. Moved datepicker logic to it's own JavaScript module.