Show German date format (DD.MM.YYYY) in the event edit form
flatpickr now uses an alternative display input with altFormat d.m.Y, typed input is parsed in that format as well. The submitted value stays ISO (Y-m-d), so form handling and validation are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
23cccf170a
commit
0ca1503129
1 file changed
+3
@@ -255,9 +255,12 @@
|
||||
if (typeof window.flatpickr === 'function') {
|
||||
const dateInputs = document.querySelectorAll('input.js-flatpickr-date');
|
||||
dateInputs.forEach(function (input) {
|
||||
// Gespeichert wird weiter ISO (Y-m-d); angezeigt und eingegeben wird deutsch (TT.MM.JJJJ)
|
||||
window.flatpickr(input, {
|
||||
locale: 'de',
|
||||
dateFormat: 'Y-m-d',
|
||||
altInput: true,
|
||||
altFormat: 'd.m.Y',
|
||||
allowInput: true
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user