You need to sign in to do that
Don't have an account?
Need assistance formatting DatePicker in CSS for use with flowDate field
I have a flow that has a date input field. I'm calling the flow in a Visualforce page that has a CSS applied. Because I'm not using standard stylesheets, the date picker format is not available. Typically I would use java script to mimic the date picker behavior, but I'm not sure ther eis a way to do this in the CSS related to a flowDate. Has anyone else done this before?
Hi,
Sorry, there's a whole bunch of stuff that goes inside the datePicker element.
What I was trying to say is that you could copy this from the page source with standardStylesheets set to true.
Here's what I pasted in:
All Answers
The only way I could get it to work was by explicitly adding the datePicker element that gets added to the page when standard stylesheets are included to my VF page.
So everything contained within:
Thank you!
I tried this:
<apex:page controller="AttachmentControllerForFlow" showHeader="false" sidebar="false" standardStylesheets="false">
<apex:stylesheet value="{!URLFOR($Resource.GetQuoteCSS, 'css.css')}"/>
<style>
.pbSubsection { margin-top: 0; }
div { margin-top: 0; }
.pbFooter { background-image:url("/RFP/resource/1371061762000/GetQuoteCSS/Images/GetQuotebody-bg.jpg"); }
.pbButtonb { background-image:url("/RFP/resource/1371061762000/GetQuoteCSS/Images/GetQuotebody-bg.jpg"); }
.pbTitle { text-align: left; }
</style>
<apex:composition template="{!$Site.Template}">
<apex:define name="body">
<flow:interview name="Broker_RFP" interview="{!myFlow}" buttonLocation="bottom" reRender="myPanel" finishLocation="{!$Page.ThankYou}">
</flow:interview>
<div class="datePicker" id="datePicker">
</div>
</apex:define>
</apex:composition>
But it still isn't working. Am I putting it in the wrong place?
Hi,
Sorry, there's a whole bunch of stuff that goes inside the datePicker element.
What I was trying to say is that you could copy this from the page source with standardStylesheets set to true.
Here's what I pasted in:
OH! You're not kidding. That is a lot. IT WORKED!!!! Thank you sooo much! I was about to give up on it. Yay!
It's probably not a solution Salesforce would endorse (and perhaps there are other alternatives?).
On the other hand one could question why omitting "standard stylesheets" alters the page content (as opposed to just its look).
Also, I would make a habit of testing this page with every platform upgrade just in case Salesforce changes this content in a way that is not backwards compatible (i.e. the older content you have pasted into your VF page no longer works with the associated javascript).
I agree completely and will definitely keep an eye on it. It would be interesting to see if anyone has other ideas, but I'm thrilled to have it working!
One other thing...
You might consider tossing in some javascript to populate the options for calYearPicker (i.e. the years you can select).
As it stands now, once we hit 2019 you won't be able to select any dates for that year!
Got it! Thank you!