function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
public with sharing class DatePickerController { public String datename { get; set; } }
<apex:page controller="DatePickerController" id="mypage"> <script type="text/javascript"> function insert(pobjSelect, psText, psValue){ var lobjOption = document.createElement("Option"); lobjOption.text = psText; lobjOption.value = psValue; pobjSelect.options.add(lobjOption); } var winLoaded = window.onload; window.onload = function(){ if(winLoaded){ winLoaded(); } var e = document.getElementById("calYearPicker"); if(e != null){ for(i = e.length - 1; i>=0; i--){ e.remove(i); } var d = new Date(); var startYear = d.getFullYear() + 6; for(var i = 1920; i<startYear; i++){ insert(e, i, i); } } } </script> <apex:form > Date: <apex:inputText value="{!datename}" size="10" id="demo" onfocus="DatePicker.pickDate(false, this , false);" /> </apex:form> </apex:page>
<apex:page controller="DatePickerController" id="mypage"> <apex:form > Date: <apex:inputText value="{!datename}" size="10" id="demo" onfocus="DatePicker.pickDate(false, this , false);" /> </apex:form> </apex:page>
Try the below code to extend the years.
Controller
Page
All Answers
Check the below links,
http://salesforce.stackexchange.com/questions/17992/binding-custom-date-picker
http://bobbuzzard.blogspot.in/2012/03/custom-date-picker.html
VF PAGE:
APEX CLASS:
OUTPUT:
If my answers solves your problem, please mark it as Best Answer, so that other can take benefit of this post.
Thanks for replay
I have used this date picker but in this can we extend the years....
How to extend the years in the above code.
Try the below code to extend the years.
Controller
Page
Thanks for replay..