fix: properly display date and time placeholders for DateTimeRangeFilter
closes: #113
Changes:
- Brought in
contrib/admin/widgets.py:AdminSplitDateTimeand made two changes:- modified init to accept
date_attrsandtime_attrsand pass them down to the subwidgets. - don't pass
argsto this init callforms.MultiWidget.__init__(self, widgets)
- modified init to accept
Status: Alright, this is working for Django 4.2 and above. I am currently trying to figure out how to make this work on older versions of django.
Visualize
📸 Before: displays 'date' in the time fields
📸 After: displays 'time' in the time fields
Codecov Report
Attention: Patch coverage is 57.14286% with 6 lines in your changes missing coverage. Please review.
Project coverage is 86.70%. Comparing base (
b4f6c29) to head (01ffef8). Report is 15 commits behind head on master.
| Files | Patch % | Lines |
|---|---|---|
| rangefilter/filters.py | 57.14% | 6 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #112 +/- ##
==========================================
- Coverage 87.45% 86.70% -0.75%
==========================================
Files 9 9
Lines 606 617 +11
==========================================
+ Hits 530 535 +5
- Misses 76 82 +6
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Look nice! Thanks you! I think it will take more time for testing to ensure there are no critical errors on older versions. After fix current tests