i'm searching to replace Y-m-d with d-m-Y.
i found that in:
views/default/input/date.php: $vars['value'] = gmdate('Y-m-d', $vars['value']);
views/default/output/date.php: $vars['value'] = gmdate('Y-m-d', $vars['value']);
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- dimitri@dg4231
dimitri - 0 likes
before "$('.elgg-input-date').datepicker({" sets the regional default for datepicker jquery-ui element. even if the date format "YYYY-MM-DD" is ISO-8601 standard, many humans intends other formats. here in italy the format recognized from people is "dd-mm-YYYY" or "dd/mm/YYYY". bye
- K32ST@K32ST
K32ST - 0 likes
You must log in to post replies.another step:
modifying js/lib/ui.js at line 261, with:
$.datepicker.regional['it'] = {
clearText: 'Svuota',
clearStatus: '',
closeText: 'Chiudi',
closeStatus: '',
prevText: '<Prec',
prevStatus: '',
nextText: 'Succ>',
nextStatus: '',
currentText: 'Oggi',
currentStatus: '',
monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
'Lug','Ago','Set','Ott','Nov','Dic'],
monthStatus: '',
yearStatus: '',
weekHeader: 'Sm',
weekStatus: '',
dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
dayNamesMin: ['Do','Lu','Ma','Me','Gio','Ve','Sa'],
dayStatus: 'DD',
dateStatus: 'D, M d',
dateFormat: 'dd/mm/yy',
firstDay: 1,
initStatus: '',
isRTL: false
};
$.datepicker.setDefaults($.datepicker.regional['it']);
Big thanks, one year after but with full love :)