How can we set initialized datepicker to start of the todays month?

Hi,
I'm using radzen datepicker and I want to set the initial value to the start of todays month.
For example: If today is January 12th, the datepicker will be set to January 1st.
If today is October 21st, the datepicker will be set to October 1st.

Is there any way to achieve this?

<RadzenDatePicker @bind-Value=@startDateInit DateFormat="d" />

@code{

DateTime? startDateInit = DateTime.Now;

}

Thanks!

Google returned the following: c# - Getting the first and last day of a month, using a given DateTime object - Stack Overflow

1 Like

Nice, i figured it out now thanks!