File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -388,6 +388,25 @@ public async Task PickTimeMode_Ok()
388388 pb . Add ( a => a . TimeFormat , null ) ;
389389 } ) ;
390390 }
391+
392+ [ Fact ]
393+ public void IsButton_Ok ( )
394+ {
395+ var cut = Context . RenderComponent < DateTimePicker < DateTime > > ( pb =>
396+ {
397+ pb . Add ( a => a . IsButton , true ) ;
398+ pb . Add ( a => a . ButtonColor , Color . Danger ) ;
399+ pb . Add ( a => a . PickerButtonText , "Pick DateTime" ) ;
400+ } ) ;
401+ cut . Contains ( "btn dropdown-toggle btn-danger" ) ;
402+
403+ cut . SetParametersAndRender ( pb =>
404+ {
405+ pb . Add ( a => a . IsButton , false ) ;
406+ } ) ;
407+ cut . DoesNotContain ( "btn dropdown-toggle btn-danger" ) ;
408+ cut . Contains ( "dropdown-toggle form-control datetime-picker-input" ) ;
409+ }
391410 #endregion
392411
393412 #region DatePicker
You can’t perform that action at this time.
0 commit comments