This question may be related to a resolved thread.
Hi,
I encountered several issues with datepicker both in CP and in Safecracker.
1) In CP entry date is being displayed with seconds (In config the value of the variable $config[‘include_seconds’] has the value ‘y’), but after picking of the date seconds are not displayed. So it seems like a bug: datepicker does not honor config variable. The same situation is in Safeckreacker: entry date displayed at first with seconds, but after picking of the date seconds disappear.
2) In Safecracker entry date at first is being displayed containing hour numbers having leading zeroes, but after picking of the date hour numbers loose leading zeroes.
3) Datepicker localization code such as this
jQuery(function($){
$.datepicker.regional['lt'] = {
closeText: 'Uždaryti',
prevText: '< Atgal',
nextText: 'Pirmyn >',
currentText: 'Šiandien',
monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis',
'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],
monthNamesShort: ['Saus','Vas','Kov','Bal','Geg','Birž',
'Liep','Rugpj','Rugs','Spal','Lapkr','Gruod'],
dayNames: ['Sekmadienis','Pirmadienis','Antradienis','Trečiadienis','Ketvirtadienis','Penktadienis','Šeštadienis'],
dayNamesShort: ['S','P','A','T','K','Pn','Š'],
dayNamesMin: ['S','P','A','T','K','Pn','Š'],
weekHeader: 'KW',
dateFormat: 'yy-mm-dd',
firstDay: 1,
isRTL: false,
showMonthAfterYear: true,
yearSuffix: ''};
$.datepicker.setDefaults($.datepicker.regional['lt']);
});has even more unfortunate result: hours, minutes, and seconds are not displayed after picking of the date. What should be value of “dateFormat” in this code in order to display hours, minutes and seconds?
The removal of “dateFormat” results into dates in which hour numbers are displayed without leading zeroes.
I need to display dates consistently, that is, in CP and Safecracker, in this format: 2012-08-29 03:01:09 PM
How can I achieve this?
Thanks.