summaryrefslogtreecommitdiff
path: root/bootstrap_datepicker/widgets.py
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap_datepicker/widgets.py')
-rw-r--r--bootstrap_datepicker/widgets.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bootstrap_datepicker/widgets.py b/bootstrap_datepicker/widgets.py
index b84006056..908b61efe 100644
--- a/bootstrap_datepicker/widgets.py
+++ b/bootstrap_datepicker/widgets.py
@@ -9,7 +9,7 @@ from django.forms.widgets import DateTimeInput
from django.utils.safestring import mark_safe
from django.utils import translation
from django.utils.html import conditional_escape
-from django.utils.encoding import force_text
+from django.utils.encoding import force_str
logger = logging.getLogger(__name__)
@@ -144,7 +144,7 @@ class DatePicker(DateTimeInput):
input_attrs = self.build_attrs(attrs, extra_attrs)
if value != '':
# Only add the 'value' attribute if a value is non-empty.
- input_attrs['value'] = force_text(self.format_value(value))
+ input_attrs['value'] = force_str(self.format_value(value))
input_attrs = {key: conditional_escape(val)
for key, val in input_attrs.items()}
if not self.picker_id:
@@ -162,7 +162,7 @@ class DatePicker(DateTimeInput):
icon_attrs=flatatt(icon_attrs))
js = self.js_template % dict(
picker_id=picker_id, options=json_dumps(self.options or {}))
- return mark_safe(force_text(html + js))
+ return mark_safe(force_str(html + js))
class DateField(forms.DateField):