T5333: Fix creating events with j.n.Y date format (Bifrost#T246884)

This commit is contained in:
Aleksander Machniak 2019-09-25 08:00:36 +00:00
parent 84fd1d18aa
commit ad33b48521
2 changed files with 6 additions and 5 deletions

View file

@ -49,7 +49,7 @@ function rcube_libcalendaring(settings)
this.datepicker_settings = {
// translate from fullcalendar (MomentJS) format to datepicker format
dateFormat: settings.date_format.replace(/M/g, 'm').replace(/mmmm/, 'MM').replace(/mmm/, 'M')
.replace(/dddd/, 'DD').replace(/ddd/, 'D').replace(/DD/, 'dd')
.replace(/dddd/, 'DD').replace(/ddd/, 'D').replace(/DD/, 'dd').replace(/D/, 'd')
.replace(/Y/g, 'y').replace(/yyyy/, 'yy'),
firstDay : settings.first_day,
dayNamesMin: settings.days_short,

View file

@ -49,12 +49,13 @@ class libcalendaring extends rcube_plugin
'calendar_first_hour' => 6,
'calendar_date_format_sets' => array(
'Y-m-d' => array('d M Y', 'm-d', 'l m-d'),
'Y/m/d' => array('d M Y', 'm/d', 'l m/d'),
'Y.m.d' => array('d M Y', 'm.d', 'l m.d'),
'd-m-Y' => array('d M Y', 'd-m', 'l d-m'),
'Y/m/d' => array('M d Y', 'm/d', 'l m/d'),
'm/d/Y' => array('M d Y', 'm/d', 'l m/d'),
'd/m/Y' => array('d M Y', 'd/m', 'l d/m'),
'd.m.Y' => array('d. M Y', 'd.m.', 'l d.m.'),
'd.m.Y' => array('d. M Y', 'd.m.', 'l d.m.'),
'd.m.Y' => array('d M Y', 'd.m', 'l d.m'),
'j.n.Y' => array('d M Y', 'd.m', 'l d.m'),
'm/d/Y' => array('M d Y', 'm/d', 'l m/d'),
),
);