0
votes

I have defined a custom Wagtail Page model with a DateField. When Wagtail renders the date picker widget, it only allows years above 1950 to be selected:

no years before 1950

For our content, we need to add years before 1950 without expecting the user to manually edit the date string.

How can we tell the Wagtail date widget to allow selection of years before 1950?

1

1 Answers

3
votes

1950 seems to be the default of the datetime picker library shipped with Wagtail.

It looks like you need to override the widget used by the field, more specifically .get_context(), and add the yearStart property.