Search code examples
symfonysonata-admin

sonata_type_date_picker not working with multiple language


I have configure sonata admin with two languages. 1. EN , 2. AR Default language is EN.

Question

how can we disable language for sonata_type_date_picker to use only default en language for datepicker ?

it works perfect when date value is empty, when i select a date and update its record it convert into Arabic language

I've render field with configureFormFields like.

->add( 'publicationDateStart', 'sonata_type_date_picker')

Symfony 2.8.3


Solution

  • I was using Sonata Intl Bundle For locale.

    Fixed this issue by adding below line to MyCusomBundle Admin Class.

    \Locale::setDefault( 'en' );

    Above code set configured locale in admin locally.