mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 00:04:16 +03:00
Add widgets for DateField and DateTimeField.
This commit is contained in:
parent
d22daa04e6
commit
7bf03bbd66
|
@ -804,6 +804,7 @@ class EmailField(CharField):
|
||||||
|
|
||||||
class DateField(WritableField):
|
class DateField(WritableField):
|
||||||
type_name = 'DateField'
|
type_name = 'DateField'
|
||||||
|
widget = widgets.DateInput
|
||||||
|
|
||||||
default_error_messages = {
|
default_error_messages = {
|
||||||
'invalid': _(u"'%s' value has an invalid date format. It must be "
|
'invalid': _(u"'%s' value has an invalid date format. It must be "
|
||||||
|
@ -841,6 +842,7 @@ class DateField(WritableField):
|
||||||
|
|
||||||
class DateTimeField(WritableField):
|
class DateTimeField(WritableField):
|
||||||
type_name = 'DateTimeField'
|
type_name = 'DateTimeField'
|
||||||
|
widget = widgets.DateTimeInput
|
||||||
|
|
||||||
default_error_messages = {
|
default_error_messages = {
|
||||||
'invalid': _(u"'%s' value has an invalid format. It must be in "
|
'invalid': _(u"'%s' value has an invalid format. It must be in "
|
||||||
|
|
Loading…
Reference in New Issue
Block a user