+ Start a Discussion

inputField Calendar in a VF page using a controller


Hi guys..  I hope someone can help me. I'm trying to use a inputField Calendar in a VF page, the problem is I using a controller, any ideas?



field calendar


This is the calendar that I'd like to have in my VF page.



Best Answer chosen by Admin (Salesforce Developers) 

All Answers


Using a controller doesn't stop you using the calendar picker, you just need to have an object with a date field in your controller.  Presumably you can instantiate a dummy task and tie the completion date of that to the input field in question?

This was selected as the best answer

One thing to beware of - make sure that the sobject you are using is accessible to all profiles that can access the page.  I used an opportunity first time around and any users with force.com platform licenses couldn't access the input field :)


Yes, for me too, THANK YOU


And thanks for your recomendation bob, how I can make sure of that?


One way is to create a custom 'carrier' object that contains a set number of all the different field types.  It means you burn a custom object from your allowance, but is one that you can add to all (custom) profiles.