styles and widgets in createview

I am using the generic editing views as described in the docs (https://docs.djangoproject.com/en/4.1/ref/class-based-views/generic-editing/#django.views.generic.edit.CreateView). Everything works fine except I cannot figure out how to style the CreateView. UpdateView shows, eg. the date widget but CreateView does not. CreateView does not seem to respect styles passed to the form element in the associated html template. I can live without the date widget in the CreateView but need to change the text color for input elements to make it useable.
Any pointers would be much appreciated.

forms.py

class StrikeModelForm(forms.ModelForm):
  class Meta:
    model = Strike
    fields = (
      'player',
      'strike_date',
      'activity',
      'ishard',
      'comments'
    )
    widgets = {
      'strike_date': widgets.DateInput(attrs={'type':'date'}),
      'comments': Textarea(attrs={'cols': 40, 'rows': 5})
    }

strike_create.html

{% extends './base.html' %}
{% block content %}
{% load crispy_forms_tags %}
<section class="body-font overflow-hidden">
  <div class="px-5 py-24 mx-auto">
    <div class="mx-auto justify-items-start text-left">
      <div class="lg:w-1/2 lg:pr-10 lg:py-2 mb-6 lg:mb-0">
        <a class="mb-2" href="{% url 'strike.list' %}">Back to strikes</a>
        <hr class="mb-2" />
        <form method="post">
          {% csrf_token %}
          {{ form.as_p }}
          <button class="border px-2 border-blue-500" type="submit">Strike!</button>
        </form>
      </div>
    </div>
  </div>
</section>
{% endblock content %}

Please post your CreateView here. If you have an UpdateView that is working as intended, please post that here as well.

You may also wish to examine the rendered HTML as it has been sent to the browser to see if you can identify the differences in that HTML.

So I realized after your question that I hadn’t finished changing to CBVs for all my views. CreateView, DeleteView, DetailView and ListView all work fine. UpdateView is creating a new record instead of updating the existing record. I want to solve this first and then I’ll get back to the cosmetics.

Thank you for your help. After getting UpdateView working I went back and the css is working normally. I had made a little bit of a mess that I needed to unravel.