Skip to content

Commit ba1c71b

Browse files
committed
Date format
1 parent 9a8f7e4 commit ba1c71b

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Form/DataField/DateFieldType.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public function getDataValue(DataField &$dataField, array $options){
4949
}
5050
else{
5151
$dates[] = null;
52+
$dataField->addMessage("Bad date format:".$dataValue);
5253
//TODO: should add a flash message
5354
}
5455
}
@@ -248,13 +249,13 @@ public function buildOptionsForm(FormBuilderInterface $builder, array $options)
248249
$optionsForm = $builder->get ( 'options' );
249250

250251
// String specific display options
251-
$optionsForm->get ( 'mappingOptions' )->add ( 'format', TextType::class, [
252-
'required' => false,
253-
'empty_data' => 'yyyy/MM/dd',
254-
'attr' => [
255-
'placeholder' => 'i.e. yyyy/MM/dd'
256-
],
257-
] );
252+
// $optionsForm->get ( 'mappingOptions' )->add ( 'format', TextType::class, [
253+
// 'required' => false,
254+
// 'empty_data' => 'yyyy/MM/dd',
255+
// 'attr' => [
256+
// 'placeholder' => 'i.e. yyyy/MM/dd'
257+
// ],
258+
// ] );
258259

259260
// String specific display options
260261
$optionsForm->get ( 'displayOptions' )->add ( 'displayFormat', TextType::class, [

0 commit comments

Comments
 (0)