function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
huniversehuniverse 

pass selected date value to controller

Hi all

 

I am displaying datepicker through following code

 

controller:

         Task t = new Task();
         public Date selecteddate = t.activitydate;
         public Task getTask() { return t; }

 

page:

          <apex:inputField value="{!task.activitydate}"/>

 

It is sObject binding. i want to to get date which is selected by user through this code and i want to use that date to add event. So is there any way to fetch date from sObject  with above code and pass it as in simple Date format  for creating event.

 

Please give some suggestions, code idea.

 

Thanks in Advance

Huniverse.