web/formfields.py
changeset 4382 6fb02edd05da
parent 4377 0e9cf6593382
child 4386 cf8842b69379
equal deleted inserted replaced
4381:62a89969c8b3 4382:6fb02edd05da
   666     widget = fw.JQueryDatePicker
   666     widget = fw.JQueryDatePicker
   667     format_prop = 'ui.date-format'
   667     format_prop = 'ui.date-format'
   668     etype = 'Date'
   668     etype = 'Date'
   669 
   669 
   670     def format_single_value(self, req, value):
   670     def format_single_value(self, req, value):
   671         return value and ustrftime(value, req.property_value(self.format_prop)) or u''
   671         if value:
       
   672             return utils.ustrftime(value, req.property_value(self.format_prop))
       
   673         return u''
   672 
   674 
   673     def render_example(self, req):
   675     def render_example(self, req):
   674         return self.format_single_value(req, datetime.now())
   676         return self.format_single_value(req, datetime.now())
   675 
   677 
   676     def _ensure_correctly_typed(self, form, value):
   678     def _ensure_correctly_typed(self, form, value):