You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/dateinput/supported-formats.md
+90-21Lines changed: 90 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,93 @@ position: 5
10
10
11
11
# Supported Date Formats
12
12
13
-
This article explains the format strings and specifiers supported by the Telerik DateInput for Blazor.
13
+
This article explains the format strings and specifiers supported by the Telerik DateInput for Blazor and how to set them to its `Format` property.
14
+
15
+
These formats are also used in composite components that also rely on a date input, such as the Date Picker and the Time Picker.
16
+
17
+
The Telerik Date Input supports the standard format strings and specifiers that come from the .NET Framework:
18
+
19
+
*[Standard Date and Time Format Strings](https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings) - all options are supported, except `O`, `o` and `U`.
20
+
*[Custom Date and Time Format Strings](https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings) - the most common date and time specifiers are supported down to the seconds level. Epoch, offset, time zone and sub-second specifiers are not supported. Here is a list of the supported specifiers:
21
+
*`d`
22
+
*`dd`
23
+
*`ddd`
24
+
*`dddd`
25
+
*`M`
26
+
*`MM`
27
+
*`MMM`
28
+
*`MMMM`
29
+
*`y`
30
+
*`yy`
31
+
*`yyy`
32
+
*`yyyy`
33
+
*`h`
34
+
*`hh`
35
+
*`H`
36
+
*`HH`
37
+
*`m`
38
+
*`mm`
39
+
*`s`
40
+
*`ss`
41
+
*`t`
42
+
*`tt`
43
+
44
+
>caution While the results of unsupported format specifiers values will render correctly, editing is not supported for them.
45
+
46
+
## Examples
47
+
48
+
>caption Standard format strings support in Telerik Date Input for Blazor
14
49
15
-
The `Format` property can take a number of possible format strings, and this is a list of the supported options and their effects.
The .NET framework supports a list of format specifiers for dates that you can use to build your own format strings: [https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings](https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings). The Telerik Date Input steps on them and carries over as many as possible to the client-side to validate and facilitate user input.
18
97
19
-
>caption Using supported .NET format specifiers to define date format in the Telerik Date Input
98
+
99
+
>caption Using supported .NET format specifiers to define relatively common date formats in the Telerik Date Input
20
100
21
101
````CSHTML
22
102
@using Telerik.Blazor.Components.DateInput
@@ -27,43 +107,32 @@ The .NET framework supports a list of format specifiers for dates that you can u
The .NET framework also has a list of standard formats for dates: [https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings](https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings). They are **not** supported with the Telerik Date Input for Blazor at this point.
134
+

65
135
66
-
>caution While the results of unsupported format specifiers values will render correctly, editing is not supported.
0 commit comments