Changeset 93b3a5d in tailbone


Ignore:
Timestamp:
06/14/18 19:37:50 (2 years ago)
Author:
Lance Edgar <lance@…>
Branches:
master
Children:
8387129
Parents:
eb1bb02
Message:

Change how date fields are handled within grid filters

don't set type="date" b/c that can trigger native browser datepicker

Location:
tailbone
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tailbone/grids/filters.py

    reb1bb02 r93b3a5d  
    8787
    8888    def render(self, value=None, **kwargs):
    89         return tags.text(self.name, value=value, type='date', **kwargs)
     89        kwargs['data-datepicker'] = 'true'
     90        return tags.text(self.name, value=value, **kwargs)
    9091
    9192
  • tailbone/static/js/jquery.ui.tailbone.js

    reb1bb02 r93b3a5d  
    358358
    359359            // Enhance any date values with datepicker widget.
    360             this.inputs.find('.value input[type="date"]').datepicker({
     360            this.inputs.find('.value input[data-datepicker="true"]').datepicker({
    361361                dateFormat: 'yy-mm-dd',
    362362                changeYear: true,
Note: See TracChangeset for help on using the changeset viewer.