Changeset 0f5d668 in tailbone


Ignore:
Timestamp:
02/22/19 20:46:54 (7 months ago)
Author:
Lance Edgar <ledgar@…>
Branches:
master
Children:
a5df9a2
Parents:
4b3e1c7
Message:

Add "plain" date widget

to avoid deform.addCallback() JS for mobile forms

surely there's a better solution, but this works for now...

Location:
tailbone
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • tailbone/forms/core.py

    r4b3e1c7 r0f5d668  
    4949from tailbone.util import raw_datetime
    5050from . import types
    51 from .widgets import ReadonlyWidget, JQueryDateWidget, JQueryTimeWidget
     51from .widgets import ReadonlyWidget, PlainDateWidget, JQueryDateWidget, JQueryTimeWidget
    5252
    5353
     
    571571        elif type_ == 'datetime_local':
    572572            self.set_renderer(key, self.render_datetime_local)
     573        elif type_ == 'date_plain':
     574            self.set_widget(key, PlainDateWidget())
    573575        elif type_ == 'date_jquery':
    574576            # TODO: is this safe / a good idea?
  • tailbone/forms/widgets.py

    r4b3e1c7 r0f5d668  
    9797
    9898
     99class PlainDateWidget(dfwidget.DateInputWidget):
     100    template = 'date_plain'
     101
     102
    99103class JQueryDateWidget(dfwidget.DateInputWidget):
    100104    """
Note: See TracChangeset for help on using the changeset viewer.