diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index f6eb266a33c848412c9e7b117bde9a4df38b54df..42555e0362e7345512abd3c733987188407f4ed4 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,7 +1,7 @@ - 6.11.4 + 6.11.5 diff --git a/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor b/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor index 64d35d705d20d947c9bac57a5031d0320f324764..41b47f4ad75cc61b3824d367fe03493f5969b712 100644 --- a/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor +++ b/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor @@ -10,6 +10,7 @@ diff --git a/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor.cs b/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor.cs index 4fd785407953ae327cf35a8c86e52b8d50950fb9..8d1a122890b6e468fdcf937b10b82fdff644a03f 100644 --- a/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor.cs +++ b/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor.cs @@ -182,6 +182,18 @@ public sealed partial class DateTimePicker DateTimePlaceHolderText ??= Localizer[nameof(DateTimePlaceHolderText)]; DatePlaceHolderText ??= Localizer[nameof(DatePlaceHolderText)]; GenericTypeErroMessage ??= Localizer[nameof(GenericTypeErroMessage)]; + + if (!string.IsNullOrEmpty(Format)) + { + DateTimeFormat = Format; + + var index = Format.IndexOf(' '); + if (index > 0) + { + DateFormat = Format[..index]; + } + } + DateTimeFormat ??= Localizer[nameof(DateTimeFormat)]; DateFormat ??= Localizer[nameof(DateFormat)];