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:
Lance Edgar 2018-06-14 19:37:50 -05:00
parent eb1bb02dc5
commit 93b3a5dab6
2 changed files with 3 additions and 2 deletions

View file

@ -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):

View file

@ -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