Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't work with Date Fields #8

Open
gil-cano opened this issue Nov 4, 2014 · 2 comments
Open

Don't work with Date Fields #8

gil-cano opened this issue Nov 4, 2014 · 2 comments
Labels

Comments

@gil-cano
Copy link
Member

gil-cano commented Nov 4, 2014

When adding a Date field like:
slaveField7 = schema.Date(title=_(u'SlaveField7', u'Start Date (day/month/year)'), default=datetime.date(2007, 4, 1))

JQuery refers to "slaveID": "#form-widgets-slaveField7"

And Date field ids are like:
form-widgets-slaveField7-day
form.widgets.slaveField7-month
form-widgets-slaveField7-year

@gil-cano gil-cano added the bug label Nov 4, 2014
@gil-cano
Copy link
Member Author

gil-cano commented Nov 5, 2014

Setting the slave field name as one of the Date field ids makes it work.
I don't know if this is a bug or is the intended way to work.

masterBoolean = MasterSelectBoolField(
    title=_(u'MasterBoolean'),
    description=_(u'This field controls the visibility of slaveField6, '
                  u'which will only become visible when this checkbox is '
                  u'checked.'),
    slave_fields=(
        {'masterID': 'form-widgets-masterBoolean-0',
         'name': 'slaveField7-day',
         'action': 'show',
         'hide_values': 1,
         'siblings': True,
         },
    ),
    required=True,
)

@woolyseal
Copy link
Member

With newer Versions of Plone with integrated pickadate as pattern this bug will persist and won't let the work-around pass it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants