jQuery datepicker を TYPO3 Flow で動作させる方法はありますか?
ピッカーを fluid-view に統合し、mysql-row を \DateTime として定義しました。
$('.datepicker').datepicker({
dateFormat: 'd.m.yy'
});
モデル:
/**
* @var \DateTime
* @Flow\Validate(type="NotEmpty")
*/
protected $tourStart;
コントローラーでは、文字列を変換する必要があります。
/**
* Initialize
* @return void
*/
public function initializeCreateAction() {
$tourStartMappingConf = $this->arguments->getArgument('tour')->getPropertyMappingConfiguration();
$tourStartMappingConf->allowProperties('tourStart', 'tourEnd');
$tourStartMappingConf->setTypeConverterOption(
'TYPO3\Flow\Property\TypeConverter\DateTimeConverter',
\TYPO3\Flow\Property\TypeConverter\DateTimeConverter::CONFIGURATION_DATE_FORMAT,
'd.m.Y'
);
}
それはうまくいかないようです。
エラー: tourStart 日付 "14.11.2014" は認識されませんでした (形式 "Ymd\TH:i:sP" の場合)。ツアー開始は必須です
何が悪いのか分かりますか?