Schedule 24 hours

Hi,

I want to change the schedule components to show times in 24 hour format instead of AM/PM. I saw that there is a locale option so I set that to "nl"... doesn`t seem to work... I tried:

import { loadCldr } from '@syncfusion/ej2-base';
import { setCulture } from '@syncfusion/ej2-base';

import * as numberingSystems from 'cldr-data/supplemental/numberingSystems.json'
import * as gregorian from 'cldr-data/main/nl/ca-gregorian.json'
import * as numbers from 'cldr-data/main/nl/numbers.json'
import * as timeZoneNames from 'cldr-data/main/nl/timeZoneNames.json'

loadCldr(numberingSystems, gregorian, numbers, timeZoneNames)
setCulture('nl')

But no luck, is there a simple example how to do this?

Regards,

Peter


1 Reply 1 reply marked as answer

RV Ravikumar Venkatesan Syncfusion Team March 8, 2021 10:14 AM UTC

Hi Peter, 

Greetings from Syncfusion support. 

We have achieved your requirement “change the schedule components to show the time in 24-hour format instead of AM/PM” at our end by setting up the “nl” locale to the Schedule. We suspect that the files from CLDR is not referred properly in your application which might cause the issue. So we suggest you to use the loadCldr method as shown below and for the same we have prepared a working sample for your reference that can be downloaded from the below link. 

 
[App.vue] 
<script> 
loadCldr(require("cldr-data/supplemental/numberingSystems.json"), require("cldr-data/main/nl/ca-gregorian.json"), require("cldr-data/main/nl/numbers.json"), require("cldr-data/main/nl/timeZoneNames.json")); 
</script> 

Kindly try the above sample and get back to us if you need any further assistance. 

Regards, 
Ravikumar Venkatesan 


Marked as answer
Loader.
Up arrow icon