承接 restruct/silverstripe-multidatepicker 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

restruct/silverstripe-multidatepicker

Composer 安装命令:

composer require restruct/silverstripe-multidatepicker

包简介

Provides an MultipleDatePickerField for managing and saving a string of multiple dates into a text field

README 文档

README

Provides an MultipleDatePickerField for managing and saving a string of multiple dates into a text field. Integrates jQuery MDP plugin, a plugin that enables jQuery UI calendar to manage multiple dates. See demo of the javascript interface & configuration options.

Maintainer Contact

  • Michael van Schaik <mic (at) restruct (dot) nl>

Requirements

  • SilverStripe 3.0 or newer

Features

  • Builds on silverstripe DateField (with Text field), same config & localisation supported (specific locales may need some further testing)
  • Integrates MDP 1.6.3, a plugin that enables jQuery UI calendar to manage multiple dates
  • Allows setting custom date separator (default: ", "), more Multidatepicker-specific configuration options can easily be added.
  • TODO(!): I could use some help with the silverstripe config system for this module; I'm now using ($this->getConfig('separator') ? $this->getConfig('separator') : ', ') in order to provide a callback for the date separator because sometimes custom configuration values don't seem to load.
  • TODO: Saving into many_many relation (currently only textfield supported)
  • TODO: Full unit test coverage
  • TODO: Validation (currently commented out)

Usage

Dates as Textfields

Event Model

class Event extends DataObject {
	static $db = array(
		'Dates' => 'Text'
	);
}

Formfield Instantiation:

$md = new MultiDateField('Dates');
	$md->setConfig('dateformat', 'dd-MM-yyyy');
	$md->setConfig('showcalendar', true);
	$md->setConfig('separator',' & ');

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-02