Ticket #16272: 16272.patch

File 16272.patch, 1.2 KB (added by aaugustin, 4 years ago)
  • django/forms/widgets.py

     
    371371
    372372class DateInput(Input):
    373373    input_type = 'text'
    374     format = '%Y-%m-%d'     # '2006-10-25'
    375374
    376375    def __init__(self, attrs=None, format=None):
    377376        super(DateInput, self).__init__(attrs)
     
    403402
    404403class DateTimeInput(Input):
    405404    input_type = 'text'
    406     format = '%Y-%m-%d %H:%M:%S'     # '2006-10-25 14:30:59'
    407405
    408406    def __init__(self, attrs=None, format=None):
    409407        super(DateTimeInput, self).__init__(attrs)
     
    435433
    436434class TimeInput(Input):
    437435    input_type = 'text'
    438     format = '%H:%M:%S'     # '14:30:59'
    439436
    440437    def __init__(self, attrs=None, format=None):
    441438        super(TimeInput, self).__init__(attrs)
     
    828825    """
    829826    A Widget that splits datetime input into two <input type="text"> boxes.
    830827    """
    831     date_format = DateInput.format
    832     time_format = TimeInput.format
    833828
    834829    def __init__(self, attrs=None, date_format=None, time_format=None):
    835830        widgets = (DateInput(attrs=attrs, format=date_format),
Back to Top