Ticket #13913: formats.patch

File formats.patch, 983 bytes (added by IsakovAN, 14 years ago)
  • django/forms/widgets.py

    old new  
    302302
    303303class DateInput(Input):
    304304    input_type = 'text'
    305     format = formats.get_format('DATE_INPUT_FORMATS')[0]
     305    format = '%Y-%m-%d'     # '2006-10-25'
    306306
    307307    def __init__(self, attrs=None, format=None):
    308308        super(DateInput, self).__init__(attrs)
     
    330330
    331331class DateTimeInput(Input):
    332332    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'
    334334
    335335    def __init__(self, attrs=None, format=None):
    336336        super(DateTimeInput, self).__init__(attrs)
     
    358358
    359359class TimeInput(Input):
    360360    input_type = 'text'
    361     format = formats.get_format('TIME_INPUT_FORMATS')[0]
     361    format = '%H:%M:%S'     # '14:30:59'
    362362
    363363    def __init__(self, attrs=None, format=None):
    364364        super(TimeInput, self).__init__(attrs)
Back to Top