#29036: HTML5 required validation does not work for SelectDateWidget
--------------------------------+--------------------------------------
     Reporter:  Vlastimil Zíma  |                    Owner:  nobody
         Type:  Bug             |                   Status:  new
    Component:  Forms           |                  Version:  master
     Severity:  Normal          |               Resolution:
     Keywords:                  |             Triage Stage:  Unreviewed
    Has patch:  0               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  1               |                    UI/UX:  0
--------------------------------+--------------------------------------

Comment (by Israel Saeta Pérez):

 Hi Vlastimil!

 I've tried to reproduce the issue you mention but it's not possible, since
 when the form field is required the empty label option is not rendered.
 From the documentation
 
https://docs.djangoproject.com/en/2.0/ref/forms/widgets/#django.forms.SelectDateWidget:
 > If the DateField is not required, SelectDateWidget will have an empty
 choice at the top of the list

 You can see this in the code as well:
 
https://github.com/django/django/blob/47d238b69602711c06c369a5555bb554a4b3f7fb/django/forms/widgets.py#L955-L995

 Therefore what you mention can never happen I believe. Can you provide a
 code sample where you can reproduce the issue? Otherwise I'm in favor of
 marking this as invalid.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29036#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.2063cdddf2d21e2e2f48826a28f8fb73%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to