We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

24 Hour mode without AM and PM

Thread ID:

Created:

Updated:

Platform:

Replies:

146942 Aug 26,2019 01:59 PM UTC Oct 2,2019 11:11 AM UTC Angular - EJ 2 14
loading
Tags: Schedule
chevron
Asked On August 26, 2019 01:59 PM UTC

Hello,

by default my scheduler is displayed in 24 hour format with the AM and PM tag.

I'd like to display it without the AM and PM from 00:00 to 23:00.

I've searched in documentation online and tried with locale = 'fr-FR' but not succesfull..

Can you tell me how to do it ?

Thanks by avance !

Karthigeyan Krishnamurthi [Syncfusion]
Replied On August 27, 2019 08:34 AM UTC

Hi Chevron, 
 
Syncfusion greetings. 
 
In 24hr format AM/PM will not be displayed like below. Kindly refer the below links and share your code example to proceed further. 
 
 
 
Regards, 
Karthi 


chevron
Replied On August 27, 2019 12:31 PM UTC

Thanks for your answer, but i only need the part where it's specified that the hours should be displayed from 00:00 to 23:00 without AM/PM..

Is there a simplified version of you example ? and with the english or french version ?

Thanks again !

Hareesh Balasubramanian [Syncfusion]
Replied On August 28, 2019 10:21 AM UTC

Hi Chevron, 
 
Thanks for your update. 
 
We need to load the respective culture files using loadCldr method from base package like below code snippet. 
 
import * as numberingSystems from './numberingSystems.json'; 
import * as gregorian from './ca-gregorian.json'; 
import * as numbers from './numbers.json'; 
import * as timeZoneNames from './timeZoneNames.json'; 
import * as currencies from './currencies.json'; 
 
loadCldr(numberingSystems, gregorian, numbers, timeZoneNames); 
 
Kindly check the sample which provided in previous update and revert us if you need any further assistance. 
 
Regards, 
Hareesh 


chevron
Replied On August 30, 2019 09:51 AM UTC

I have another questions, 

I can see in this example:

that used file is fr-CH, but where can i get these files ? and is there the fr-FR file ?

Thanks !

LoadCldr(
    require('cldr-data/supplemental/numberingSystems.json'),
    require('cldr-data/main/fr-CH/ca-gregorian.json'),
    require('cldr-data/main/fr-CH/numbers.json'),
    require('cldr-data/main/fr-CH/timeZoneNames.json'));

chevron
Replied On August 30, 2019 03:36 PM UTC

And also where can i get these files ????

loadCldr(
    require('cldr-data/supplemental/numberingSystems.json'),
    require('cldr-data/main/fr-CH/ca-gregorian.json'),
    require('cldr-data/main/fr-CH/numbers.json'),
    require('cldr-data/main/fr-CH/timeZoneNames.json'));

Vinitha Devi Murugan [Syncfusion]
Replied On September 2, 2019 08:00 AM UTC

 
Hi chevron, 
 
Thanks for your update. 
 
By installing the following commend npm install cldr-data --save, you can get the required culture files in your project and the same can be documented in the link below. Please follow the documentation steps below and let us know if you need any further assistance on this. 
 
 
Regards, 
M.Vinitha devi 


chevron
Replied On September 2, 2019 10:18 AM UTC

Hi,

After trying to include example code provided in my project, i have the same error than TRAN:

I don't know why ? i've copied every files of your example without modifiyng them ???

And Also, when i run  npm install cldr-data --save,  i have an error and so the node_modules/cldr-data is not created, can you tell me where i could download directly files ??

Thanks again...








Hareesh Balasubramanian [Syncfusion]
Replied On September 4, 2019 05:10 PM UTC

Hi Chevron, 
 
Thanks for your update. 
 
We have prepared a sample based on your requirement using locale property as fr culture, which can be viewed from the following link, 
 
Please try the above sample, if you have any concerns please revert us back for further assistance. 

Regards, 
Hareesh 


chevron
Replied On September 11, 2019 01:49 PM UTC

I still have the same error:



Karthigeyan Krishnamurthi [Syncfusion]
Replied On September 13, 2019 09:14 AM UTC

Hi Chevron,  
  
Thanks for your update. 
 
We have checked the case in the below Angular 8 sample and Schedule is render correctly in fr locale. 
 
Kindly try the sample and if the issue persists, try to reproduce the error in a sample and revert else share your build version, code example/runnable sample (if possible) to serve you better. 
 
Regards, 
Karthi 
 
 


chevron
Replied On September 13, 2019 10:10 AM UTC

Hi,

First thing: It seems that you've missed json files and folder cldr-data/ because i can't find it ???

I've used my own files and imported and launch your project but have exactly the same error:

I've only changed the require by import because i had errors with require:

Do you think it could be the cause of the error ?

Replaced this:
loadCldr(
  require('numberingSystems.json'),
  require('ca-gregorian.json'),
  require('numbers.json'),
  require('timeZoneNames.json'));
BY:
import * as numberingSystems from './numberingSystems.json';
import * as gregorian from './ca-gregorian.json';
import * as numbers from './numbers.json';
import * as timeZoneNames from './timeZoneNames.json';

loadCldr(numberingSystems, gregorian, numbers, timeZoneNames);



Vinitha Devi Murugan [Syncfusion]
Replied On September 27, 2019 11:21 AM UTC

  
Hi Chevron, 
 
We are able to reproduce the reported issue and kindly use below code to overcome the reported issue and same can be available in below link. 
 
loadCldr(numberingSystems['default'], gregorian['default'], numbers['default'], timeZoneNames['default']);  
 
   
 
Regards, 
M.Vinitha devi. 


chevron
Replied On October 1, 2019 09:54 AM UTC

Hello,

I've finally succeeded and it's well working in a virgin project. But when integrating it to my angular project i have again the same error: cannot trim value of undefined..


When debugging, it appears in node_modules/@syncfusion/ej2-schedule/dist/es6/ej2/ej2-schedule.es2015.js
Line 15001... 

if (this.parent.locale === 'en' || this.parent.locale === 'en-US') {
  longDateFormat = getValue('dateFormats.long', getDefaultDateObject(this.parent.getCalendarMode()));
}
else {
  longDateFormat = getValue('main.' + '' + this.parent.locale + '.dates.calendars.' + this.parent.getCalendarMode() + '.dateFormats.long', cldrData);
    
 // AT THIS LINE cldrData is empty.... whereas it should contains values downloaded in loadCldr ?????????????



}
if (!endDate) {
  return globalize.formatDate(startDate, { format: longDateFormat, calendar: this.parent.getCalendarMode() });
}
let dateFormat = longDateFormat.trim().toLocaleLowerCase();  //SO at this time there is the error

Can you see why cldrData is empty at this time and how to force its value ???

Thanks !









Hareesh Balasubramanian [Syncfusion]
Replied On October 2, 2019 11:11 AM UTC

Hi Chevron, 

Thanks for your update. 

We would like to inform that provided information is not sufficient and kindly share more details like schedular code snippet / image of your project, to serve you better. 

Regards, 
Hareesh 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon