Change how date fields are handled within grid filters
don't set type="date" b/c that can trigger native browser datepicker
This commit is contained in:
parent
eb1bb02dc5
commit
93b3a5dab6
|
@ -86,7 +86,8 @@ class DateValueRenderer(FilterValueRenderer):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def render(self, value=None, **kwargs):
|
def render(self, value=None, **kwargs):
|
||||||
return tags.text(self.name, value=value, type='date', **kwargs)
|
kwargs['data-datepicker'] = 'true'
|
||||||
|
return tags.text(self.name, value=value, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
class ChoiceValueRenderer(FilterValueRenderer):
|
class ChoiceValueRenderer(FilterValueRenderer):
|
||||||
|
|
2
tailbone/static/js/jquery.ui.tailbone.js
vendored
2
tailbone/static/js/jquery.ui.tailbone.js
vendored
|
@ -357,7 +357,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
// Enhance any date values with datepicker widget.
|
// Enhance any date values with datepicker widget.
|
||||||
this.inputs.find('.value input[type="date"]').datepicker({
|
this.inputs.find('.value input[data-datepicker="true"]').datepicker({
|
||||||
dateFormat: 'yy-mm-dd',
|
dateFormat: 'yy-mm-dd',
|
||||||
changeYear: true,
|
changeYear: true,
|
||||||
changeMonth: true
|
changeMonth: true
|
||||||
|
|
Loading…
Reference in a new issue