#8962: Make `input_formats` and `format` work consistently across `date`,
`datetime`, and `time` fields and widgets.
------------------------------------+---------------------------------------
 Reporter:  mrmachine               |       Owner:  nobody    
   Status:  new                     |   Milestone:  post-1.0  
Component:  Forms                   |     Version:  SVN       
 Keywords:  datetime format widget  |       Stage:  Unreviewed
Has_patch:  1                       |  
------------------------------------+---------------------------------------
 Currently, there are some inconsistencies in what form fields and widgets
 we have available for `date`, `datetime`, and `time` data. There are also
 inconsistencies in how the `format` argument applies to the widgets, and
 the `input_formats` applies to the fields.

  1. `DateTimeInput` and `TimeInput` exist, `DateInput` doesn't.
  2. `DateTimeInput` accepts `format`, but `TimeInput` doesn't.
  3. `SplitDateTimeField` doesn't use `SplitDateTimeWidget` by default.
  4. `SplitDateTimeField` doesn't allow the user to specify
 `input_formats`.
  5. `SplitDateTimeWidget` uses two `TextInput` widgets, instead of
 `TimeInput` and the missing `DateInput` (and thus doesn't allow the user
 to specify `formats`).
  6. `django.contrib.localflavor.generic.forms` is missing
 `SplitDateTimeField`.
  7. The documentation is sparse on detail for `SplitDateTimeField`,
 `DateTimeInput` and `TimeInput`.

 This patch:

  1. Adds `DateInput`, which accepts `format`, and is used for `DateField`
 by default.
  2. Adds `format` as an argument to `TimeInput`.
  3. Uses `SplitDateTimeWidget` for `SplitDateTimeField` by default.
  4. Adds `input_date_formats` and `input_time_formats` as arguments to
 `SplitDateTimeField`.
  5. Uses `DateInput` and `TimeInput` for `SplitDateTimeWidget`, and passes
 through `date_format` and `time_format` through to `DateInput` and
 `TimeInput` as `format`, respectively.
  6. Adds `SplitDateTimeField` to
 `django.contrib.localflavor.generic.forms`.
  7. Adds documentation for all of these changes.
  8. Adds tests for all of these changes.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8962>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to