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:
Stephen Burrows 2014-05-06 18:14:06 -07:00 committed by Claude Paroz
parent 35e1b1efab
commit a5de0df58b
4 changed files with 35 additions and 3 deletions

View file

@ -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),