File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
src/BootstrapBlazor/Components/DateTimePicker Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 172172 <input type =" text" autocomplete =" off" readonly class =" form-control"
173173 value =" @CurrentTime.ToString(TimeFormat)"
174174 @onclick =" @OnShowTimePicker" />
175- <TimePicker Value =" CurrentTime" OnClose =" OnCloseTime" OnConfirm =" OnConfirmTime" ></TimePicker >
175+ <TimePicker Value =" CurrentTime" HasSeconds =" HasSeconds()"
176+ ShowRequired =" false" ShowLabel =" false" SkipValidate =" true"
177+ OnClose =" OnCloseTime" OnConfirm =" OnConfirmTime" ></TimePicker >
176178 </div >
177179 }
178180 @if (ShowFooter )
Original file line number Diff line number Diff line change @@ -734,6 +734,16 @@ private void OnShowTimePicker()
734734 StateHasChanged ( ) ;
735735 }
736736
737+ private bool HasSeconds ( )
738+ {
739+ if ( TimeFormat != null )
740+ {
741+ return TimeFormat . Contains ( 's' ) ;
742+ }
743+
744+ return TimePickerOption . ShowSecond ;
745+ }
746+
737747 private bool ShouldConfirm => ! IsDateTimeMode && ( AutoClose || ShowFooter == false ) ;
738748
739749 /// <summary>
You can’t perform that action at this time.
0 commit comments