0

I want to add datepicker in my code. I downloaded bootstrap-datepicke. But how add correct this component? I tried something like this

<form action="{{ path('pattient_test') }}" method="post" >
   <input type="text" id="pick" value="02/16/12" data-date-format="mm/dd/yy" class="datepicker" >
   <input type="submit" value="Prześlij zmienione dane"/>
</form> 

And then in controller

 var_dump( $this->get('request')->request->get('pick'));

But I still get NULL

1 Answer 1

2

Try by adding name attribute to your pick input field,

name="pick"

Also,

var_dump( $this->get('request')->request->all()); Allows you to check all POST parameters, it may help you figure out what's going wrong.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.