+ Start a Discussion
Alo SenAlo Sen 

date input field style attribute(alignment)

What is the syntax for the style attribute for apex inputfield? I would like to align the date inputfield to the right or the left depending on the input from another field.
PratikPratik (Salesforce Developers) 
Hi Alo,

You can write your CSS logic and can cll it through styleclass or style attribute of  <apex:inputfield> tag.

You can also refer:

Hope this will help.

Alo SenAlo Sen
<style type="text/css">   
     align-items: left;
     align-items: right;

<apex:pageBlockSectionItem rendered="{!recurrenceTrue}">                           
                            <apex:outputLabel >End Date</apex:outputLabel>
                            <apex:inputfield value="{!newEvent.Date__c}" styleClass="dtalign1" required="true"/>

  <apex:pageBlockSectionItem rendered="{!monthlyrecurrenceTrue}">                          
                           <apex:outputLabel >End Date</apex:outputLabel>                
                           <apex:inputfield value="{!newEvent.Date__c}" styleClass="dtalign2" required="true"/>                        </apex:pageBlockSectionItem>  

This is what I was trying to do, but the alignment does not seem to work. These date fields appear based on the checkboxes checked.
Thank you.