silverstripe / timedropdownfield
dev-master
2013-02-18 21:01 UTC
Requires
- php: >=5.3.2
- composer/installers: *
- silverstripe/framework: ~3.0
This package is not auto-updated.
Last update: 2024-07-10 21:42:56 UTC
README
时间下拉框字段
允许从下拉列表中选择特定的时间间隔,作为直接输入到TimeField
的替代。遵循通过TimeField
API设置的时间格式用户偏好,该API通过扩展支持通过i18n::get_time_format()
的用户偏好。
使用方法
作为一个独立的字段
:::php
$field = TimeDropdownField::create('MyTime', 'My Time Field');
作为DatetimeField
的一部分(需要SilverStripe 3.1)
:::php
$datetimeField = DatetimeField::create('MyDateTime', My Date and Time Field')
->setTimeField(TimeDropdownField::create('MyDateTime[time]'));
配置
interval
:选项之间的分钟间隔(默认:60)
注意:由于该字段扩展了TimeField
,大多数配置都发生在那里。
维护者
- Ingo Schommer (@chillu)
感谢Air New Zealand赞助并为此模块做出贡献!