Commit 049c3cc1 authored by Vincent Pelletier's avatar Vincent Pelletier

Allow DateTimeKey to parse its value, to make it easier to use from Listboxes.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26482 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 384d16d7
......@@ -38,6 +38,7 @@ from DateTime.DateTime import DateTime, DateTimeError, _cache
from Products.ZSQLCatalog.Interface.ISearchKey import ISearchKey
from Interface.Verify import verifyClass
from Products.ZSQLCatalog.SQLCatalog import profiler_decorator
from Products.ZSQLCatalog.SearchText import parse
MARKER = []
......@@ -242,6 +243,9 @@ class DateTimeKey(SearchKey):
default_comparison_operator = None
get_operator_from_value = True
def parseSearchText(self, value, is_column):
return parse(value, is_column)
def _renderValueAsSearchText(self, value, operator):
return '"%s"' % (DateTime(value).ISO(), )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment