• Bill Turner
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

If I create the very simple Visualforce page below, some unwanted datepicker elements appear on the page. Specifically, the dropdowns for month & day, the days of the week, and the "Today" link.

 

<apex:page showHeader="false" sidebar="false">
    <apex:form >
        <apex:commandLink value="Save" />
    </apex:form>
</apex:page>

 

If I use a commandButton instead, the datepicker elements disappear:

 

<apex:page showHeader="false" sidebar="false">
    <apex:form >
        <apex:commandButton value="Save" />
    </apex:form>
</apex:page>

 

Looking into the generated HTML, the first page is missing several script and CSS references that the second page has. I'm guessing this is the problem, but why is this happening?

 

My current workaround is to add a hidden commandButton to the form (see below), but I'd rather not rely on this. Am I doing something wrong in the first example? Are others able to reproduce this?

 

<apex:page showHeader="false" sidebar="false">
    <apex:form >
    	<apex:commandLink value="Save" />
        <apex:commandButton value="Save" style="display:none;" />
    </apex:form>
</apex:page>