How to set the Default Value of Today to a Radzen DatePicker that is already bound?

300 Views Asked by At

I have a Radzen Datepicker in a Blazor Application:

<RadzenDatePicker @[email protected] [email protected]()  DateFormat="d" Change=@(args => OnChangeOrder(args, "DatePicker", "MM/dd/yyyy", )) Class="w-100" />

Right now, when a user clicks the DatePicker, it opens up to the current month and year. But, I want the Datepicker to automatically highlight today's date (like their online demo).

So far, everything I have read uses the '@bind-Value=' to set today's date.

But how do you do that, when the date picker is already bound to a field from your model?

@[email protected]

In this scenario, the user is creating a new record.

0

There are 0 best solutions below