Input date dans un form sf2.7
Bonjour,
dans la formtype j'ai mis:
Code:
1 2 3 4 5 6 7 8
|
->add('datePriseEffet', 'date', array(
'widget' => 'single_text',
'input' => 'datetime',
'format' => 'dd/MM/yyyy',
'attr' => array('class' => 'form-control'),
) ) |
et dans la vue:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
<div class="col-sm-6" id="datePriseEffet" style=""> <!-- CSS modifié -->
<div class="form-group">
<div class="input-group date" id="datetimepicker2">
{# <input type="text" class="form-control"> #}
{{ form_widget(form.datePriseEffet, { 'attr': {'class':'form-control'} }) }}
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$('#datetimepicker2').datetimepicker({
viewMode: 'years'
});
}); |
j'ai eu cette exception:
Citation:
Warning: IntlDateFormatter::parse(): Date parsing failed
merci d'avance