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
rajubalajirajubalaji 

How to Show standard date time field in vf page

Hi everyOne.

How to show the standard date time functionality in vf page.

User-added imagesame like this how can i created in visual force page with select list of time 8:00AM to 7:00PM with the interval of 15 mintues.

if any one have idea please help me with syntax.

thanks inadvance.
p.Balu
Team NubesEliteTeam NubesElite
Hi Balaji,
It seems that apex:inputField does not provide this functionality and I was not able to find apex tag that offers it.
The only solution that comes to my mind is to use input tags like this example
<apex:page standardController="Event">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockSection >
                <apex:inputField value="{!Event.StartDateTime}" showDatePicker="true" required="true"/>
                <apex:outputPanel >
                    <apex:outputLabel value="Start" for="eventstartdate"/>
                    <input type ="date" id="eventstartdate" value="{!Event.StartDateTime}"/>
                    <input type ="time" value="{!Event.StartDateTime}"/>
                </apex:outputPanel>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form> 
</apex:page>

Thank You
www.nubeselite.com
Development | Training | Consulting

Please mark this as solution if your problem resolved.


 
sachinarorasfsachinarorasf
Hi Balaji,

Please follow the below link:

https://salesforce.stackexchange.com/questions/82250/how-to-show-standard-date-time-field-in-vf-page

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Sachin Arora