I have a visual force page with an apex controller. In the controller I have a variable Date date1
. In the page I have an <apex:input type="date" value="{!date1}"/>
. Everything works fine.
Now I need to have only a month-year selector, no day has to be showed. One option could be to use instead two number input, or a picklist (for months) and a number (for the year) but I'd like to mantain a calendar standard element.
Is there any way?
Best Answer
You would need to use jQuery to achieve that.
The following jsFiddle has a working example. http://jsfiddle.net/bopperben/DBpJe/
This jsFiddle was created by a user on the following post. https://stackoverflow.com/questions/2208480/jquery-ui-datepicker-to-show-month-year-only