Powermail Datepicker Date Format Fix

The powermail Typo3 extension provides a feature to have a date picker for your date input field. With the jquery option of powermail this is generated using the jquery ui date picker plugin.

Depending on the language you use, you might run into the problem of an invalid date format produced by the date picker. For example, with a German locale you might get a 02.10.YY instead of 02.10.2013.

wrong-dateformat

The reason for this is the powermail extension’s language file. It specifies the date format with a capital YY, not supported by the jQuery UI date picker.

To fix this issue, you must modify the language specific translation setting of the date format to use lower case letters: “dd.mm.yy”. You can do this by modifying the extension translation file.
However, a much easier way is to add the language setting as typo script to the setup section of your template. The example above shows the fix for the German language (‘de’). For other languages use the according language id.

# POWERMAIL
# Datumsformat im Datepixker
plugin.tx_powermail_pi1._LOCAL_LANG {
  de {
    datepicker_dateformat = dd.mm.yy
  }
}

1 Comment

  1. Giampi

    Thanks!

Leave a Comment