File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/BootstrapBlazor/Components/DateTimePicker Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -515,6 +515,13 @@ protected override async Task OnParametersSetAsync()
515515 await UpdateDisabledDaysCache ( true ) ;
516516 }
517517
518+ private bool _render = true ;
519+
520+ /// <summary>
521+ /// <inheritdoc/>
522+ /// </summary>
523+ protected override bool ShouldRender ( ) => _render ;
524+
518525 private async Task UpdateDisabledDaysCache ( bool force )
519526 {
520527 if ( OnGetMonthDisabledDaysCallback != null )
@@ -571,7 +578,10 @@ private async Task OnClickPrevYear()
571578 private async Task OnClickPrevMonth ( )
572579 {
573580 CurrentDate = CurrentDate . GetSafeMonthDateTime ( - 1 ) ;
581+
582+ _render = false ;
574583 await UpdateDisabledDaysCache ( false ) ;
584+ _render = true ;
575585
576586 if ( OnDateChanged != null )
577587 {
@@ -600,7 +610,10 @@ private async Task OnClickNextYear()
600610 private async Task OnClickNextMonth ( )
601611 {
602612 CurrentDate = CurrentDate . GetSafeMonthDateTime ( 1 ) ;
613+
614+ _render = false ;
603615 await UpdateDisabledDaysCache ( false ) ;
616+ _render = true ;
604617
605618 if ( OnDateChanged != null )
606619 {
You can’t perform that action at this time.
0 commit comments