Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
147089 | Aug 31,2019 09:33 PM UTC | Oct 11,2019 09:33 AM UTC | Blazor | 9 |
![]() |
Tags: Grid |
<b>Datepicker with Format:</b> dd/MM/YYYY
<div><EjsDatePicker Format="dd/MM/yyyy" Width="250px"></EjsDatePicker></div>
<b>Datepicker with Format:</b> dd.MM.YYYY
<div><EjsDatePicker Format="dd.MM.yyyy" Width="250px"></EjsDatePicker></div> |
File Name |
Path |
ca-gregorian |
cldr/main/en/ca-gregorian.json |
timeZoneNames |
cldr/main/en/timeZoneNames.json |
numbers |
cldr/main/en/numbers.json |
numberingSystems |
cldr/supplemental/numberingSystems.json |
currencies |
cldr/main/en/currencies.json |
@using Microsoft.JSInterop
@using Syncfusion.EJ2.Blazor.Grids
<EjsGrid DataSource="@Orders" AllowSorting="true" AllowPaging="true" AllowGrouping="true">
<GridColumns>
...
<GridColumn Field=@nameof(Order.OrderDate) HeaderText=" Order Date" Format="yMd" Type="ColumnType.Date" TextAlign="TextAlign.Right" Width="130"></GridColumn>
</GridColumns>
</EjsGrid>
@code{
[Inject]
IJSRuntime JsRuntime { get; set; }
EjsGrid<Order> gridInstance;
...
protected override void OnAfterRender()
{
this.JsRuntime.Ejs().LoadLocaleData("wwwroot/de.json").LoadCldrData(new string[] { "wwwroot/scripts/cldr-data/main/de/currencies.json", "wwwroot/scripts/cldr-data/main/de/numbers.json", "wwwroot/scripts/cldr-data/main/de/ca-gregorian.json", "wwwroot/scripts/cldr-data/main/de/timeZoneNames.json", "wwwroot/scripts/cldr-data/supplemental/numberingSystems.json" }).SetCulture("de").SetCurrencyCode("EUR");
}
}
|
|
<GridColumn Field=@nameof(Order.OrderDate) HeaderText="Order Date" CustomFormat="@(new { type ="date", format="dd.MM.yyyy" })" Type="ColumnType.Date">
|
Format |
Formatted value |
{ type=”date”, format=”dd/MM/yyyy”} |
04/07/1996 |
{ type=”date”, format=”dd.MM.yyyy” } |
04.07.1996 |
{ type=”date”, skeleton=”short” } |
7/4/96 |
{ type=”dateTime”, format= ”dd/MM/yyyy hh:mm a” } |
04/07/1996 12:00 AM |
{ type= “dateTime”, format= “MM/dd/yyyy hh:mm:ss a” } |
07/04/1996 12:00:00 AM |
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.
This page will automatically be redirected to the sign-in page in 10 seconds.