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
RAJU_DEEPRAJU_DEEP 

date picker

Hello

          I am trying to create a date time picker in visualforce page but i unable to create it. As i try it in simple html it is quite easy .

Any suggestion regarding this will be helpful for me and if possible give me some basic code to create it.

 

Thanks...

WesNolte__cWesNolte__c

Hey

 

It depends, what does your visualforce page look like so far? Do you want to store the date in an Object field, or do you want to store it in an Apex Page Controller Variable?

 

Wes

ThomasTTThomasTT

> Do you want to store the date in an Object field, or do you want to store it in an Apex Page Controller Variable?

Anyway, I would use a date field in a SOBject (my favorite is Task.ActivityDate). If you chose Task.AcivityDate, then define a Task object in your controller and use the field in your VF page, so the field will be with the date picker. When you save it or do any action with it, you just take the date value fron the Task object and do what you need to do with it. Note that you need to choose non-required field for the date dummy field, otherwise, the validation rule suspend your process and it never goes to the controller.

ThomasTT