You need to sign in to do that
Don't have an account?

Unable to pass values from VF Page to Controller
Hi All,
I am unable to pass the values from VF page to controller for date field.
I am unable to pass the values from VF page to controller for date field.
<apex:page docType="html-5.0" controller="Sample"> <apex:form > <apex:pageBlock > <apex:pageBlockSection> <apex:pageBlockSectionItem> Date: <apex:input type="date" value="{!dat}"/> </apex:pageBlockSectionItem> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page> Apex Controller: public class Sample { public Date dat {get;set;} public Sample() { System.debug('EnteringDate'+dat); } }
Update your code like below Page
Let us know if this will help you
It didn't work for me. I am still receiving the same null while passing to the action method.
Thank You!
The above solution which amit posted works absolutely fine, please check your code once again.
Best Regards,
Nagendra.P
You need to open page then you need to select date after that click on show button it will work.
Let us know if that will help you