#12705: Admin date widget not working on inlines until after validation failure
----------------------------------+-----------------------------------------
 Reporter:  russellm              |       Owner:  nobody    
   Status:  new                   |   Milestone:  1.2       
Component:  django.contrib.admin  |     Version:  1.1       
 Keywords:                        |       Stage:  Unreviewed
Has_patch:  0                     |  
----------------------------------+-----------------------------------------
 Sample models.py:
 {{{
 class Publisher(models.Model):
    name = models.CharField(max_length=300)

 class Book(models.Model):
    name = models.CharField(max_length=300)
    publisher = models.ForeignKey(Publisher)
    pubdate = models.DateField()

 }}}

 admin.py:
 {{{
 class BookInline(admin.TabularInline):
     model = Book
     # extra = 1

 class PublisherAdmin(admin.ModelAdmin):
     inlines = [BookInline]

 admin.site.register(Publisher, PublisherAdmin)
 }}}

 Test procedure:
  1. Create a new publisher
  2. Click the "Add a new book" button
  3. Set the name of the book.
  3. Press the today button. Nothing happens - the date doesn't populate
 the date field.
  4. Press the calendar widget. Select a date. The date doesn't populate
 the date field.
  5. Save the object. This should cause a validation error, as pubdate is a
 required field
  6. Press the today button. It works!
  7. Press the calendar widget. It works!

 I've observed this using Safari 4.0.4, Firefox 3.5.7, and Chrome
 4.0.249.49 (35163) beta on OSX 10.5.8.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12705>
Django <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