Skip to content

startDate with "dd/mm/yyy hh:ii" format cause unselectable date #17

Description

@InternalServerError

Hi,

I've a trouble :
I'm trying to set up the bundle but I can't set the desired startDate or format.
Here my formType :
$builder
->add('dateBegin'
, 'collot_datetime'
, array(
'pickerOptions' =>
array('format' => 'dd/mm/yyyy hh:ii'
, 'weekStart' => 1
, 'startDate' => date('d/m/Y H:i')
, 'endDate' => '01/01/3000'
, 'daysOfWeekDisabled' => '0,6'
, 'autoclose' => true
, 'startView' => 'month'
, 'minView' => 'day'
, 'maxView' => 'decade'
, 'todayBtn' => true
, 'todayHighlight' => true
, 'keyboardNavigation' => true
, 'language' => 'fr'
, 'forceParse' => true
, 'minuteStep' => 30
, 'pickerReferer ' => 'default' //deprecated
, 'pickerPosition' => 'bottom-right'
, 'viewSelect' => 'day'
, 'showMeridian' => false
, 'initialDate' => date('d/m/y', time()), //example
)
)

But when I click on my input I cannot select any date whereas I set format to "dd/mm/yyy" and startDate to "date('d/m/Y')" everything works fine but I lose the datetime format for an only date one.

Where might be my mistakes ?

Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions