ralphbean/tw2.jqplugins.ui — Issue #5: Text field value not being returned when using DatePickerWidget
Author: scottawilliams71
Created: 2011-10-11 17:43:49+00:00
State: open

When using code similar to the following:
class ReportForm(twf.TableForm):
action = 'report_add'
report_type = twf.TextField
report_date = twf.DatePickerWidget
narrative = twf.TextArea(rows=10, cols=80)

The values returned on submit do not include the 'report_date'. After closer inspection of the html generated, the "name" attribute is missing for the DatePickerWidget text field.

Issue is resolved by changing the class definition from:
class DatePickerWidget(ui.base.JQueryUIWidget):
to:
class DatePickerWidget(ui.base.JQueryUIWidget, twf.TextField):

tw2 versions are:
tw2.core==2.0b8
tw2.forms==2.0b5
tw2.jqplugins.ui==2.0b21
tw2.jquery==2.0b9