I've created a DateField index and created a custom indexer that converts my schema.Data (a datetime.date field) to a zope DateTime. Indexer appears to work when view the index via zmi.
I've added a the following records entry to registry.xml so that I can access my field in collections. https://pastebin.com/dsaenqPn
<records interface="plone.app.querystring.interfaces.IQueryField" prefix="plone.app.querystring.field.custom_date_field_id"> <value key="title">Custom Date Field</value> <value key="description"></value> <value key="enabled">True</value> <value key="sortable">True</value> <value key="operations"> <element>plone.app.querystring.operation.date.lessThan</element> <element>plone.app.querystring.operation.date.largerThan</element> <element>plone.app.querystring.operation.date.between</element> <element>plone.app.querystring.operation.date.lessThanRelativeDate</element> <element>plone.app.querystring.operation.date.largerThanRelativeDate</element> </value> <value key="group">Metadata</value> </records>
The date.lessThan and date.largerThan operators provide a date calendar widget, but don't seem to actually query against the date selected, as all content with the indexed field is returned regardless of the value of those widgets. Is there a missing step? the date.lessThanRelativeDate and date.largerThanRelativeDate widgets seem to function as advertised.