by default use new jquery widgets for Time/Date/DateTime fields
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 26 Jan 2010 16:47:45 +0100
changeset 4374 ff3efacfea42
parent 4373 972143183ea3
child 4375 6d34e3cf60a3
by default use new jquery widgets for Time/Date/DateTime fields
web/formfields.py
--- a/web/formfields.py	Tue Jan 26 16:47:07 2010 +0100
+++ b/web/formfields.py	Tue Jan 26 16:47:45 2010 +0100
@@ -661,8 +661,9 @@
 
 
 class DateField(StringField):
+    widget = fw.JQueryDatePicker
     format_prop = 'ui.date-format'
-    widget = DateTimePicker
+    etype = 'Date'
 
     def format_single_value(self, req, value):
         return value and ustrftime(value, req.property_value(self.format_prop)) or u''
@@ -680,11 +681,13 @@
 
 
 class DateTimeField(DateField):
+    widget = fw.JQueryDateTimePicker
     format_prop = 'ui.datetime-format'
     etype = 'Datetime'
 
 
 class TimeField(DateField):
+    widget = fw.JQueryTimePicker
     format_prop = 'ui.time-format'
     etype = 'Time'