You need to sign in to do that
Don't have an account?
AgentDealerX
I need a Date Time component for visualforce page?
I want to display and allow the users to edit the event records fields Start Date Time and End Date Time on visualforce. It will not allow editing of these fields similar to the edit button on the event records. Does anyone have a visualforce component to handle the date time similar to salesforce?
Salesforce - Why isn't this a standard component for handling any date time field?
Event UI Handler for Date Time:
Visual Force Handler for Date time:
Hi,
You can use <apex:inputfield> tag for this. It will automatically take the property of that field which you have bind with this. Try the below code as reference(Pass the id of event in URL):
<apex:page standardController="Event">
<apex:form >
<apex:inputField value="{!event.startdatetime}"/>
</apex:form>
</apex:page>
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
This is not the same date time ui handler when creating or editing new events in salesforce. In salesforce events they have a separate input area for time with a drop down.
Event UI Handler for Date Time:
Visual Force Handler for Date time:
You code provided the second graphic (Visualforce Handler)
Develop a custom component datetime UI implementation and share it on AppExchange. ;-)
Since Salesforce already has it in the events edit, so why doesn't Salesforce share the existing one right here? We are all trying to keep the UI consistent with Salesforce for the benefit of all users.
Even better, it should be made standard for date time fields!
I've been strugling to find a solution for this and I finally did, so here it is, feel free to reuse it :)
1- So first of all you have to download this JQuery Lib : http://jonthornton.github.io/jquery-timepicker/ (http://jonthornton.github.io/jquery-timepicker/" target="_blank) (Click the "Download (Zip)" on the top right).
2- So if you open the zip, you'll find the jquery files inside a folder. So what I did is that I selected the add files and ziped them directly so there're not inside a file. that help with the referencing inside the visualforce page.
3- Go to your salesforce and under configuration type "Static Resources" > New > then upload your zip file that you created (I uploaded it under the name "TimePicker").
4- Make sure when you are creating the visualforce page to choose the apiVersion = 27.0 !!
5- The visualforce page should look like this :
6 - The controller looks like this :
7 - and you'll be good to go.
I hope this helps. Good Luck.