Dear Team,
I am doing this code
<div class="content">
@for (int i = 0; i <= 5; i++)
{
<div class="row">
<SfSwitch @ref="statusSwitch[i]" OffLabel="OFF" OnLabel="ON" ValueChange="@Change" TChecked="bool"></SfSwitch>
<SfTimePicker @ref="timeFrom[i]" TValue="DateTime" Value="DateTime.Now" Enabled="status[i]" Step=30 Format="HH:mm"></SfTimePicker>
<h4>@status[i]</h4>
<h4>@i</h4>
</div>
}
</div>
@code{
public Dictionary<int, SfTimePicker<DateTime>> timeFrom = new Dictionary<int, SfTimePicker<DateTime>>();
public Dictionary<int, bool> status = new Dictionary<int, bool>();
public Dictionary<int, SfSwitch<bool>> statusSwitch = new Dictionary<int, SfSwitch<bool>>();
private bool isChecked = true;
private void Change(Syncfusion.Blazor.Buttons.ChangeEventArgs<bool> args)
{
// Your code here.
}
}
I want to use toggle button to enable or disable the specific SfTimePicker. Please fix this code or advise how i can get the desired results ?
Thank You