DateField raises errors from admin edit form
|Reported by:||Paul Winkler||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
In any model with a DateField, I can create them fine in the newforms admin UI, but after that I can't edit them
again because the value of the field is set incorrectly in the edit form.
- Create a model with a required DateField (do not use auto_now).
- Give your model a basic admin UI.
- Fire up the dev server and use the admin UI to add an instance of your model. Use the "Today" button to set the date. It saves just fine.
- Click on your instance in the Changelist display to edit it.
- Click "Save". You get a validation error even though you have not changed anything.
- Notice that "00:00:00" was appended to your date. If you manually delete the "00:00:00" and click "Save and continue editing", it works.
- Click "Save" again and you get the error again. Repeat ad nauseum.
Tested as of newforms-admin r7815, using MySQL.