<h4>DateTimePicker with Turkish culture</h4>
<ejs-datetimepicker [value]='date' locale='tr'></ejs-datetimepicker>
<h4>DateTimePicker with Turkish DateFormat without using culture</h4>
<ejs-datetimepicker [value]='date' [format]="format"></ejs-datetimepicker> |
import { Component } from '@angular/core';
import { loadCldr, L10n } from "@syncfusion/ej2-base";
declare var require: any;
loadCldr(
require("cldr-data/main/tr/numbers.json"),
require("cldr-data/main/tr/ca-gregorian.json"),
require("cldr-data/supplemental/numberingSystems.json"),
require("cldr-data/main/tr/timeZoneNames.json")
);
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
public date: Date = new Date("12/11/2017 1:00 AM");
public format: string ="dd.MM.yyyy hh:mm";
ngOnInit(): void {
/*loads the localization text*/
L10n.load({
'tr': {
'datetimepicker': {
placeholder: "Wählen Sie ein Datum und eine Uhrzeit aus",
today:"heute"
}
}
});
}
} |
export class BankAcountBalanceQueryComponent implements OnInit {
ngOnInit() {
console.log(defaultCulture);
}
} |
npm install cldr-data --save
npm install @syncfusion/ej2-angular-grids --save
npm install @syncfusion/ej2-angular-calendars --save
npm install cldr-data --save