Use system date format for datepicker

Previously the American date format (m/d/Y) was used exclusively for
formatting dates in the datepicker widget. This patch enables the widget to
be formatted based on the format set in the admin panel.

Fixes #829