Skip to content

Commit

Permalink
Fixed #30758 -- Made RangeFields use multiple hidden inputs for initi…
Browse files Browse the repository at this point in the history
…al data
  • Loading branch information
nasirhjafri committed Sep 14, 2019
1 parent b8dff52 commit 4a0bbb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion django/contrib/postgres/forms/ranges.py
Expand Up @@ -2,7 +2,7 @@

from django import forms
from django.core import exceptions
from django.forms.widgets import MultiWidget
from django.forms.widgets import MultiWidget, MultipleHiddenInput
from django.utils.translation import gettext_lazy as _

__all__ = [
Expand All @@ -16,6 +16,7 @@ class BaseRangeField(forms.MultiValueField):
'invalid': _('Enter two valid values.'),
'bound_ordering': _('The start of the range must not exceed the end of the range.'),
}
hidden_widget = MultipleHiddenInput

def __init__(self, **kwargs):
if 'widget' not in kwargs:
Expand Down

0 comments on commit 4a0bbb1

Please sign in to comment.