I am trying to create a VF page which has options to capture the startdatetime and enddatetime. These fields are datetime fields.
<apex:inputField value="{!eve.StartDateTime }" id="eveStartDateTime"/>
would give one text box to enter the date and time. The user would have to change the text on the input field to change the time. What i want to achieve is to have something like the start and end on the events object.
One way i could think of was to have 1 inputText and one selectoption, one to capture the date and select option to capture the time and then join them together and save them as a datetime.
Is there a better way of doing this? Going by what i had thought of still gives me an error.
<apex:pageBlockSectionItem> may have no more than 2 child components
The idea is to have a label and date and time together.
<apex:pageblockSectionItem>
<apex:OutPutLabel Value="Start"/>
<apex:inputtext value="{!StartDate }" id="eveStartDate"/>
<apex:selectList id="eveStartTime" value="{!StartTime}" size="1">
<apex:selectOption itemValue="00:00" itemLabel="00:00"/>
<apex:selectOption itemValue="00:30" itemLabel="00:30"/>
<apex:selectOption itemValue="01:00" itemLabel="01:00"/>
<apex:selectOption itemValue="01:30" itemLabel="01:30"/>
<apex:selectOption itemValue="02:00" itemLabel="02:00"/>
</apex:selectList>
</apex:pageblockSectionItem>
Is there any other way to achieve this?
if i join the date and time in a string and then convert that string to Datetime and save it would it save the time in the users timezone?