I have a SfDropDownButton where I placed a SfTimePicker in the PopupContent
<SfDropDownButton Content="@Operation.DisplayText">
<PopupContent>
<div class="popup-border">
<SfTimePicker TValue="DateTime?" @bind-Value="@StartTime" Format="HH:mm:ss" />
</div>
</PopupContent>
</SfDropDownButton>
|
@using Syncfusion.Blazor.SplitButtons
@using Syncfusion.Blazor.Calendars
<SfDropDownButton CssClass="e-caret-hide" Content="Show">
<PopupContent>
<div>
<SfTimePicker TValue="DateTime?" Format="HH:mm:ss" @bind-Value="@dateTime">
<TimePickerEvents TValue="DateTime?" OnOpen="OpenPopup" OnClose="beforeClose"></TimePickerEvents>
</SfTimePicker>
</div>
</PopupContent>
<ChildContent>
<DropDownButtonEvents OnClose="popupClose"></DropDownButtonEvents>
</ChildContent>
</SfDropDownButton>
<p class="customCss">@dateTime</p>
@code {
private DateTime? dateTime;
private bool ispopUp = false;
private void popupClose(BeforeOpenCloseMenuEventArgs args)
{
args.Cancel = this.ispopUp;
}
private void OpenPopup(PopupEventArgs args)
{
this.ispopUp = true;
}
private void beforeClose(PopupEventArgs args)
{
this.ispopUp = false;
}
}
|