0

Mon Tue Wed Thu Fri Sat Sun

                    Today

I didn't wrote any code relating to dates, but while generating the letter from Visualforce this calendar is being displayed. Does anyone know how to disable that thing ...

3
  • please only use tags specificly related to your question, that will help attract the right people! Could you maybe share your visualforce code, it is not entirely clear what you're asking or what the problem is. Jan 22, 2014 at 12:30
  • 2
    @who voted to close this: maybe please first add comments to improve things before asking things to be closed. Jan 22, 2014 at 12:30
  • 1
    Please share some code so folks know what you are doing. It will help them understand the problem better and get you an answer faster. Jan 22, 2014 at 14:36

2 Answers 2

3

This is usually due to having a Visualforce page with the showheader="false" and a form on the page. Setting showheader to false stops the standard stylesheets being included, and these have the styles that hide the calendar markup. As far as I recall this is added even if you don't have a date or datetime input fields.

One solution is to add the standardstylesheets="true" attribute to the page tag - this will include the stylesheets and hide the calendar markup. Or you can clone the style as suggested at the end of this thread:

https://developer.salesforce.com/forums?id=906F000000097QUIAY

although this would be fragile, as if Salesforce changed the style class names then the calendar would appear again. The thread also makes mention that using a commandbutton in the form fixes the problem - I haven't tried that myself.

2
  • even i added standardstylesheets="true" this one .it is coming still
    – Teja
    Jan 22, 2014 at 11:33
  • standardstylesheets="false" i have tried this one it is working now thankyou
    – Teja
    Jan 22, 2014 at 11:45
2

You can use this to remove focus from the calendar element when the page loads which fixes the display.

<Script>
function setFocusOnLoad() {}
</Script>
2
  • 1
    The quality of your answers would greatly improve if you add some explanation. Why and how will using setFocusOnLoad{} solve the question asked ? Jan 22, 2014 at 14:03
  • 1
    In the VF page simply put <script> function setFocusOnLoad(){} </script> and it will remove the focus from the calendar control and thus the calendar box will not pop up. This is helpful if you want to include standard stylesheets
    – Eric
    Jan 22, 2014 at 15:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .