<div id={@id} class="col-12 col-sm-10 col-md-6 col-lg-5 col-xl-4 col-xxl-3 mt-1">

  <h3>Calendar view</h3>

  <%= form_for :calendar_view, "#", [phx_change: :changed, phx_submit: :save, phx_target: @myself], fn cvf -> %>

    <%= label cvf, :week_start_at, "Week starts at", class: "form-label" %>
    <div class="inner-addon left-addon mb-3">
      <i class="bi bi-calendar2-range icon is-left text-muted fs-5"></i>
      <%= select cvf, :week_start_at, week_start_options(),
          value: @current_user.week_start_at,
          class: "form-select"
        %>
    </div>

    <div class="mb-3">
      <%= submit "Save",
          class: "btn btn-primary",
          disabled: @form_week_start_at == @current_user.week_start_at,
          aria_disabled: (@form_week_start_at == @current_user.week_start_at) && "true" || false,
          phx_disable_with: "Saving..."
        %>
    </div>

  <% end %>

</div>
