Ticket #13913: formats.patch
File formats.patch, 983 bytes (added by , 14 years ago) |
---|
-
django/forms/widgets.py
old new 302 302 303 303 class DateInput(Input): 304 304 input_type = 'text' 305 format = formats.get_format('DATE_INPUT_FORMATS')[0]305 format = '%Y-%m-%d' # '2006-10-25' 306 306 307 307 def __init__(self, attrs=None, format=None): 308 308 super(DateInput, self).__init__(attrs) … … 330 330 331 331 class DateTimeInput(Input): 332 332 input_type = 'text' 333 format = formats.get_format('DATETIME_INPUT_FORMATS')[0]333 format = '%Y-%m-%d %H:%M:%S' # '2006-10-25 14:30:59' 334 334 335 335 def __init__(self, attrs=None, format=None): 336 336 super(DateTimeInput, self).__init__(attrs) … … 358 358 359 359 class TimeInput(Input): 360 360 input_type = 'text' 361 format = formats.get_format('TIME_INPUT_FORMATS')[0]361 format = '%H:%M:%S' # '14:30:59' 362 362 363 363 def __init__(self, attrs=None, format=None): 364 364 super(TimeInput, self).__init__(attrs)