Datetime Picker showing current time

Hello,
I have a datetime picker and I want it to have the show the current time all the time and if a datetime picker is changed then just keep the edited time. is there a way to do this? so when it is just seeting on the page it will be like a clock always updating but if it is activated it will keep the date time ented.

thanks
Kirk

Maybe you can bind it to variable set to DateTime.Now.

I'm doing that but it does not keep it updated so if someone lets it sit 10 min which will happen with the application then the start time will be off by 10 min

You might need to update this variable on every state change or use a property and return every time DateTime.Now in the property getter.

To All,
I got it working. I added Majorsoft.Blazor.Components.timer.
added to my razer page
"AdvancedTimer IsEnabled="@_clockEnabled" IntervalInMilisec="@clockInterval" Occurring="Times.Infinite()" AutoStart="false" OnIntervalElapsed="@Clock" />"
and
<RadzenDatePicker TValue="DateTime" @bind-Value="@currentdate" ShowSeconds="true" ShowTime="true" CurrentDateChanged="@DatePicker1CurrentDateChanged" >

Added the code

private DateTime currentdate =DateTime.Now;
private double clockInterval = 1000;
private bool _clockEnabled = True;

private void Clock()
{
currentdate = DateTime.Now;
}

    protected async System.Threading.Tasks.Task DatePicker1CurrentDateChanged(System.DateTime args)
    {
    _clockEnabled = false; 
        timetosave = currentdate; // this is where you save the time you want

    }

You can create a timer without another third party dependency:

@implements IDisposable

<RadzenDatePicker TValue="DateTime" @bind-Value="@ currentTime" />

@code {
        DateTime currentTime;

        System.Threading.Timer timer;

        protected override void OnInitialized()
        {
            timer = new System.Threading.Timer(() =>
            {
                currentTime = DateTime.Now;
         
                InvokeAsync(StateHasChanged);
            }, null, 0, 1000); // Run every 1000 ms (1 second).
        }

        void Dispose()
        {
            timer?.Dispose();
        }
}