1. Create a narrow home page component and copy the below html code.
2. Add the home page component to home page layout.
3. Done
Component Code
2. Add the home page component to home page layout.
3. Done
Component Code
<script language="javascript">
function addoption(selectobj,txt,val){
var optn = document.createElement("OPTION");
optn.text = txt;
optn.value = val;
selectobj.options.add(optn);
}
var oldwinload = window.onload;
window.onload = function() {
if (oldwinload) {
oldwinload();
}
var obj = document.getElementById("calYearPicker");
if(obj!=null){
var d = new Date();
var curYear = d.getFullYear() + 6;
for(var i=curYear;i<2030;i++) {
addoption(obj,i,i);
}
}
}
</script>
Great stuff, thanks
ReplyDelete