Skip to content

Instantly share code, notes, and snippets.

Created December 27, 2014 16:48
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Implement doctrine datetime picker range on Sonata Admin Filter by @webdevilovers
protected function configureDatagridFilters(DatagridMapper $datagridMapper)
->add('createdAt', 'doctrine_orm_datetime_range', array(),
'required' => false,
'widget' => 'single_text',
'attr' => array(
'class' => 'datepicker',
'data-date-format' => 'YYYY-MM-DD'
Copy link

marvoh commented Feb 24, 2015

The option "widget" does not exist. Known options are: "action", "attr", "auto_initialize", "block_name", "by_reference", "cascade_validation", "compound", "constraints", "csrf_field_name", "csrf_message", "csrf_protection", "csrf_provider", "csrf_token_id", "csrf_token_manager", "data", "data_class", "disabled", "empty_data", "error_bubbling", "error_mapping", "extra_fields_message", "field_options", "field_type", "horizontal_input_wrapper_class", "horizontal_label_class", "horizontal_label_offset_class", "inherit_data", "intention", "invalid_message", "invalid_message_parameters", "label", "label_attr", "label_render", "mapped", "max_length", "method", "pattern", "post_max_size_message", "property_path", "read_only", "required", "sonata_admin", "sonata_field_description", "sonata_help", "translation_domain", "trim", "validation_groups", "virtual"

Copy link

Related issue:

The widget option is gone. Currently there is no way to get a single text field to get a datepicker - just single selects.

But there is a discussion for this feature:

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