Hi,
I would like to have french (dd-mm-yyyy) calendars for date selection at event creation.
Is it possible ?
I've see that two different system of date picker : when creating an event with ajax, and creating event from link "create an new event", so my question is upon the two systems.
I've tried to add in event.js, without success :
this.$('.joms-pickadate-startdate').pickadate({
monthsFull: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
weekdaysShort: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'],
today: 'aujourd\'hui',
clear: 'effacer',
formatSubmit: 'yyyy/mm/dd'
})
Hi.
The date format can be edited via the langauge file. For example to change date format on the event page, you can edit the string code COM_COMMUNITY_EVENT_TIME_FORMAT_LC1 in your language file.
As far I know you can't edit date in date picker like that... but I ask developer.
Hi,
COM_COMMUNITY_EVENT_TIME_FORMAT_LC1 is already in french format : "%A, %d %B %Y". All php generated dates are in french format wich is okay.
I searching how to change date format in the two differents date pickers used.
I'll wait for your developer, hoping he's got a solution
Thanks
Regards
Hi.
It's not in js files... and very good :)
Copy this file: ROOT/components/com_community/templates/default/events.forms.php
to: ROOT/templates/your-template/html/com_community (if you don't have "html" or "com_community" folders, feel free to create them)
And in line 214 and 257 you can change date format.
Hi,
Thanks, I've made the copy. When editing events.form.php, I've got in line 214 :
function toggleEventDateTime()
{
if( joms.jQuery('#allday').attr('checked') == 'checked' ){
joms.jQuery('#start-time, #end-time').hide();
}else{
joms.jQuery('#start-time, #end-time').show();
}
}
<span class="jomNameTips" title="<?php echo JText::_('COM_COMMUNITY_EVENTS_ALL_DAY_TIPS');?>">
<input class="input checkbox" id="allday" name="allday" type="checkbox" onclick="toggleEventDateTime();" value="1" <?php if($event->allday){ echo 'checked'; } ?> /> <?php echo JText::_('COM_COMMUNITY_EVENTS_ALL_DAY'); ?>
</span>
joms.jQuery("#enddate").datepicker
({
minDate: 0,
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
}).datepicker('option','minDate',joms.jQuery('#startdate').datepicker('getDate')) /* set min date */
.datepicker('setDate', "<?php echo $event->enddate;?>"); /* init date when edit event */
joms.jQuery("#enddate").datepicker
({
minDate: 0,
changeMonth: true,
changeYear: true,
dateFormat: 'yy-mm-dd',
monthsFull: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
weekdaysShort: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'],
today: 'aujourd\'hui',
clear: 'effacer',
formatSubmit: 'yyyy/mm/dd'
}).datepicker('option','minDate',joms.jQuery('#startdate').datepicker('getDate')) /* set min date */
.datepicker('setDate', "<?php echo $event->enddate;?>"); /* init date when edit event */
Hi.
I provided information for JomSocial 3.2.0.7:
prntscr.com/408k7f
prntscr.com/408ka6