Is there a 3-dropdown (month, day, year) date widget that can be used out of the box with Django?

This is what I had in mind (link):

or this from MDN:

Unfortunately the native HTML <input type="date"> is not accessible enough, and I wouldn’t like to re-invent the wheel if possible. (The first is a jQuery snippet, but I don’t want to use jQuery, and the second is quite buggy.)

Thank you in advance for any suggestions!

Feel like an idiot because there is even an example of SelectDateWidget (which does exactly what I need), but didn’t realize it as I just scanned the Widget docs.

Don’t. (“Feel like an idiot”) There’s a lot in Django and it’s easy to overlook / forget stuff.

I’ve been using Django consistently now for just about 10 years, and you can see how many things I forget or have overlooked by the number of times my responses get corrected by people more knowledgeable than me. (As was the case here, since I saw your question and didn’t think of that either. :slight_smile:)

1 Like