You need to sign in to do that
Don't have an account?
Alo 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.
You can write your CSS logic and can cll it through styleclass or style attribute of <apex:inputfield> tag.
You can also refer:
http://www.salesforce.com/us/developer/docs/salesforce1/Content/vf_dev_best_practices_approaches_mixed.htm
Hope this will help.
Thanks,
Pratik
.dtalign1{
align-items: left;
}
.dtalign2{
align-items: right;
}
</style>
<apex:pageBlockSectionItem rendered="{!recurrenceTrue}">
<apex:outputLabel >End Date</apex:outputLabel>
<apex:inputfield value="{!newEvent.Date__c}" styleClass="dtalign1" required="true"/>
</apex:pageBlockSectionItem>
<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.