jrief / django-formset

The missing widgets and form manipulation library for Django
https://django-formset.fly.dev/
MIT License
317 stars 30 forks source link

DatePicker Uncaught Error #98

Closed codematsing closed 8 months ago

codematsing commented 9 months ago

version: 1.1.1

DateTimePicker-QJNPLAAA.js:1  Uncaught Error: Unknown aria-label on [object HTMLDivElement]
    at c.getViewMode (DateTimePicker-QJNPLAAA.js:1:8877)
    at c.registerElement (DateTimePicker-QJNPLAAA.js:1:14462)
    at MutationObserver.observe.childList (DateTimePicker-QJNPLAAA.js:1:8511)

What happens:

jrief commented 9 months ago

Please use version 1.3.4

Does this date-time-picker work for you?

Read the contribution guidelines before issuing a bug report.

codematsing commented 9 months ago

My bad, stopped trying to debug this since I found the workaround to use DateInput over DatePicker instead.

I did however replicated it using the instructions in your documentation.

The issue seems to arise when we use DatePicker on FormCollections

Reproduction Steps:

# forms/birthdate.py
class BirthdateFormCollection(FormCollection):
    birth_date_forms = BirthdatePickerForm()
    min_siblings=2
# testapp/views.py
    path('birthdate.picker.formcollection', DemoFormCollectionView.as_view(
        collection_class=BirthdateFormCollection,
    ), name='birthdate.picker.formcollection'),

Screenshot

image

test on: http://localhost:8000/bootstrap/birthdate.picker.formcollection

Uncaught Error: Unknown aria-label on [object HTMLDivElement]
    at w.getViewMode (chunk-AFISV5BP.js:5:2862)
    at w.registerCalendar (chunk-AFISV5BP.js:5:4119)
    at MutationObserver.observe.childList (chunk-AFISV5BP.js:5:1906)
jrief commented 9 months ago

That's indeed a weird modal dialog. Can you please share the complete code to reproduce it. Just point me on your GitHub repository branch.

tolland commented 4 days ago

js_error_aria_label_2024-09-07_09-58