Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

french date format in events

10 years 10 months ago
  • ewajoom's Avatar
    Topic Author
  • ewajoom
  • Offline
  • Fresh Boarder
  • Posts: 37
  • Thank you received: 1
Licenses:
JomSocial Expired

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'
})

Thanks

10 years 10 months ago
Licenses:

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.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
10 years 10 months ago
  • ewajoom's Avatar
    Topic Author
  • ewajoom
  • Offline
  • Fresh Boarder
  • Posts: 37
  • Thank you received: 1
Licenses:
JomSocial Expired

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

10 years 10 months ago
Licenses:

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.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
10 years 9 months ago
  • ewajoom's Avatar
    Topic Author
  • ewajoom
  • Offline
  • Fresh Boarder
  • Posts: 37
  • Thank you received: 1
Licenses:
JomSocial Expired

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();
						}
					}
And near line 257 :
<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'; } ?> />&nbsp;<?php echo JText::_('COM_COMMUNITY_EVENTS_ALL_DAY'); ?>
					</span>

I don't really understand what change I have to do...

So, I've tried to change at line 198 :
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 */
by :
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 */

Without any effect... I think that solution is not very far... Thanks for help

10 years 9 months ago
Licenses:

Hi.

I provided information for JomSocial 3.2.0.7:

prntscr.com/408k7f

prntscr.com/408ka6


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW