npm install cldr-data --save |
mport { DatePickerComponent } from '@syncfusion/ej2-react-calendars';
import React from 'react';
import './App.css';
//Load the L10n from ej2-base
import { L10n } from "@syncfusion/ej2-base";
import { loadCldr } from "@syncfusion/ej2-base";
declare var require: any;
loadCldr(
require('cldr-data/main/de/ca-gregorian.json'),
require('cldr-data/main/de/numbers.json'),
require('cldr-data/main/de/timeZoneNames.json'),
require('cldr-data/supplemental/numberingSystems.json')
);
//load the locale object to set the localized placeholder value
L10n.load({
de: {
datepicker: {
placeholder: "Wählen Sie ein Datum",
today:"heute"
}
}
});
const App: React.FC = () => {
return <DatePickerComponent id="datepicker" locale='de'/>;
}
export default App;
|