我想为本地时间格式自定义Schema.Datetime字段小部件,只显示年-月-日。谢谢!
您可以使用日期字段,它将自动呈现仅日期小部件:
from my.package import _
from plone.supermodel import model
from zope import schema
class IMyContentType(model.Schema):
...
start_date = schema.Date(
title=_(u'Start date'),
description=_(u'This widget will show only the date.'),
required=False,
)