[date picker] revert #ec65ca70aac9 which breaks the date picker (closes #3182844) stable
authorDavid Douard <david.douard@logilab.fr>
Thu, 03 Oct 2013 11:10:08 +0200
branchstable
changeset 9247 9785c54e707e
parent 9245 13181e652736
child 9248 909eb8b584c4
[date picker] revert #ec65ca70aac9 which breaks the date picker (closes #3182844)
web/formwidgets.py
--- a/web/formwidgets.py	Thu Sep 26 19:04:45 2013 +0200
+++ b/web/formwidgets.py	Thu Oct 03 11:10:08 2013 +0200
@@ -688,7 +688,7 @@
         # XXX find a way to understand every format
         fmt = req.property_value('ui.date-format')
         fmt = fmt.replace('%Y', 'yy').replace('%m', 'mm').replace('%d', 'dd')
-        req.add_onload(u'$("#%s").datepicker('
+        req.add_onload(u'cw.jqNode("%s").datepicker('
                        '{buttonImage: "%s", dateFormat: "%s", firstDay: 1,'
                        ' showOn: "button", buttonImageOnly: true})' % (
                            domid, req.uiprops['CALENDAR_ICON'], fmt))
@@ -720,7 +720,7 @@
 
     def _render(self, form, field, renderer):
         domid = field.dom_id(form, self.suffix)
-        form._cw.add_onload(u'$("#%s").timePicker({step: %s, separator: "%s"})' % (
+        form._cw.add_onload(u'cw.jqNode("%s").timePicker({step: %s, separator: "%s"})' % (
                 domid, self.timesteps, self.separator))
         return self._render_input(form, field)