equal
deleted
inserted
replaced
659 raise ProcessFormError(form._cw._('a float is expected')) |
659 raise ProcessFormError(form._cw._('a float is expected')) |
660 return None |
660 return None |
661 |
661 |
662 |
662 |
663 class DateField(StringField): |
663 class DateField(StringField): |
|
664 widget = fw.JQueryDatePicker |
664 format_prop = 'ui.date-format' |
665 format_prop = 'ui.date-format' |
665 widget = DateTimePicker |
666 etype = 'Date' |
666 |
667 |
667 def format_single_value(self, req, value): |
668 def format_single_value(self, req, value): |
668 return value and ustrftime(value, req.property_value(self.format_prop)) or u'' |
669 return value and ustrftime(value, req.property_value(self.format_prop)) or u'' |
669 |
670 |
670 def render_example(self, req): |
671 def render_example(self, req): |
678 raise ProcessFormError(unicode(ex)) |
679 raise ProcessFormError(unicode(ex)) |
679 return value |
680 return value |
680 |
681 |
681 |
682 |
682 class DateTimeField(DateField): |
683 class DateTimeField(DateField): |
|
684 widget = fw.JQueryDateTimePicker |
683 format_prop = 'ui.datetime-format' |
685 format_prop = 'ui.datetime-format' |
684 etype = 'Datetime' |
686 etype = 'Datetime' |
685 |
687 |
686 |
688 |
687 class TimeField(DateField): |
689 class TimeField(DateField): |
|
690 widget = fw.JQueryTimePicker |
688 format_prop = 'ui.time-format' |
691 format_prop = 'ui.time-format' |
689 etype = 'Time' |
692 etype = 'Time' |
690 |
693 |
691 |
694 |
692 # relation vocabulary helper functions ######################################### |
695 # relation vocabulary helper functions ######################################### |