Add the @rendermode directive
@inject NavigationManager Navigation
@rendermode InteractiveServer
<EditForm Model="@searchModel" OnValidSubmit="Submit" FormName="BookingForm" class="book_now">
<ValidationSummary />
<div class="row">
<div class="col-md-12">
<span>Arrival</span>
<img class="date_cua" src="/template/images/date.png">
<InputDate class="online_book" @bind-Value="searchModel.CheckIn" />
<div class="mb-3">Entered date: @searchModel.CheckIn</div>
</div>
<div class="col-md-12">
<span>Departure</span>
<img class="date_cua" src="/template/images/date.png">
<InputDate class="online_book" @bind-Value="searchModel.CheckOut" />
<div class="mb-3">Entered date: @searchModel.CheckOut</div>
</div>
<div class="col-md-12">
<button type="submit" class="book_btn">Book Now</button>
</div>
</div>
</EditForm>
Without the @rendermode
directive the page is rendered statically (SSR only), so the model won’t be updated on submit.
By adding @rendermode InteractiveServer
(or another interactive mode), the binding works as expected.