mirror of
https://github.com/django/django.git
synced 2025-10-27 15:46:10 +00:00
Fixed #22502 -- Fixed microseconds/default/form interaction
Made explicit lack of microsecond handling by built-in datetime form fields. Used that explicitness to appropriately nix microsecond values in bound fields. Thanks Claude Paroz for the review.
This commit is contained in:
committed by
Claude Paroz
parent
35e1b1efab
commit
a5de0df58b
@@ -419,6 +419,7 @@ class Textarea(Widget):
|
||||
|
||||
class DateTimeBaseInput(TextInput):
|
||||
format_key = ''
|
||||
supports_microseconds = False
|
||||
|
||||
def __init__(self, attrs=None, format=None):
|
||||
super(DateTimeBaseInput, self).__init__(attrs)
|
||||
@@ -846,6 +847,7 @@ class SplitDateTimeWidget(MultiWidget):
|
||||
"""
|
||||
A Widget that splits datetime input into two <input type="text"> boxes.
|
||||
"""
|
||||
supports_microseconds = False
|
||||
|
||||
def __init__(self, attrs=None, date_format=None, time_format=None):
|
||||
widgets = (DateInput(attrs=attrs, format=date_format),
|
||||
|
||||
Reference in New Issue
Block a user