watnweb/datefield
最新稳定版本:v1.0.0
Composer 安装命令:
composer require watnweb/datefield
包简介
Date field for the DreamForm plugin for Kirby CMS
README 文档
README
This plugin extends DreamForm for Kirby CMS by adding a Date field.
Features
- Native Datepicker: Style and customize it to your needs.
- Limit Dates: Allows configuration of minimum and maximum date values.
- Default Value: Can set the current date or a fixed date as the default value.
- Future Dates Only Optionally prevent selection of past dates.
- Validation: Includes built-in validation to ensure correct date input.
Installation
- Download the plugin files.
- Place the plugin directory into your Kirby
site/pluginsfolder.
Styling
If you are using Tailwind or the demo styles I reccomend adding the following classes to your dreamform/form snippet:
'date' => [ "error" => ['class' => 'hidden group-data-[has-error]:group-has-[:invalid]:block text-red-500 text-sm'], "input" => ['class' => 'peer group-data-[has-error]:group-has-[:invalid]:mb-2 shadow-sm group-data-[has-error]:group-has-[:invalid]:border-red-500 w-full border border-gray-200 rounded p-2'] ]
Panel Preview
There currently is no panel preview for this field yet. For now it uses the text-field preview.
This way you can at least set basic attributes like the key or label inline. More settings can be found in the Edit overlay.
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-07-25