Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/BootstrapBlazor/Components/DateTimeRange/DateTimeRange.razor
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@
</div>
}
<CascadingValue Value="this" IsFixed="true">
<DatePickerBody Value="@StartValue" ValueChanged="UpdateValue" OnDateChanged="OnStartDateChanged"
DateFormat="@DateFormat" TimeFormat="@TimeFormat" ViewMode="ViewMode"
ShowLunar="ShowLunar" ShowSolarTerm="ShowSolarTerm" ShowFestivals="ShowFestivals" ShowHolidays="ShowHolidays"
ShowRightButtons="@_showRightButtons" MaxValue="MaxValue" MinValue="MinValue">
</DatePickerBody>
@if (RenderMode == DateTimeRangeRenderMode.Double)
{
<DatePickerBody Value="@EndValue" ValueChanged="UpdateValue" OnDateChanged="OnEndDateChanged"
<DatePickerBody Value="@StartValue" ValueChanged="UpdateValue" OnDateChanged="OnStartDateChanged"
DateFormat="@DateFormat" TimeFormat="@TimeFormat" ViewMode="ViewMode"
ShowLunar="ShowLunar" ShowSolarTerm="ShowSolarTerm" ShowFestivals="ShowFestivals" ShowHolidays="ShowHolidays"
ShowLeftButtons="false" MaxValue="MaxValue" MinValue="MinValue">
ShowRightButtons="false" MaxValue="MaxValue" MinValue="MinValue">
</DatePickerBody>
}
<DatePickerBody Value="@EndValue" ValueChanged="UpdateValue" OnDateChanged="OnEndDateChanged"
DateFormat="@DateFormat" TimeFormat="@TimeFormat" ViewMode="ViewMode"
ShowLunar="ShowLunar" ShowSolarTerm="ShowSolarTerm" ShowFestivals="ShowFestivals" ShowHolidays="ShowHolidays"
ShowLeftButtons="@_showLeftButtons" MaxValue="MaxValue" MinValue="MinValue">
</DatePickerBody>
</CascadingValue>
</div>
<div class="picker-panel-footer">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public bool AllowNull
.AddClass("disabled", IsDisabled)
.Build();

private bool _showRightButtons = false;
private bool _showLeftButtons = false;

/// <summary>
/// <inheritdoc/>
Expand All @@ -297,7 +297,7 @@ protected override void OnInitialized()
}
}

_showRightButtons = RenderMode == DateTimeRangeRenderMode.Single;
_showLeftButtons = RenderMode == DateTimeRangeRenderMode.Single;
}

/// <summary>
Expand Down