equal
deleted
inserted
replaced
565 super(JQueryDatePicker, self).__init__(**kwargs) |
565 super(JQueryDatePicker, self).__init__(**kwargs) |
566 self.datestr = datestr |
566 self.datestr = datestr |
567 |
567 |
568 def _render(self, form, field, renderer): |
568 def _render(self, form, field, renderer): |
569 req = form._cw |
569 req = form._cw |
|
570 if req.lang != 'en': |
|
571 req.add_js('jquery.ui.datepicker-%s.js' % req.lang) |
570 domid = field.dom_id(form, self.suffix) |
572 domid = field.dom_id(form, self.suffix) |
571 # XXX find a way to understand every format |
573 # XXX find a way to understand every format |
572 fmt = req.property_value('ui.date-format') |
574 fmt = req.property_value('ui.date-format') |
573 fmt = fmt.replace('%Y', 'yy').replace('%m', 'mm').replace('%d', 'dd') |
575 fmt = fmt.replace('%Y', 'yy').replace('%m', 'mm').replace('%d', 'dd') |
574 req.add_onload(u'cw.jqNode("%s").datepicker(' |
576 req.add_onload(u'cw.jqNode("%s").datepicker(' |