Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Can not generate a blank option on a drop down menu
I have a script that generates the days of a month once you select a month and checks to see if the month is a leapyear once you select a year. I can't get the day drop down list to have a blank option on top of the 1 once a month or year has been selected. So lets say you select a date and then you decide to not enter a date you can't make the day dropdown menu blank because there is no blank option to choose. Can someone tell me how I can enter a blank option into my day dropdown menu?
function GetDaysInMonth(iMonth, iYear)
var dPrevDate = new Date(iYear, iMonth, 0);
if((TheMonth !=="" && TheYear!=="") || (TheMonth !==null && TheYear !==null))
var Daysarray=new Array(mylength)
0 · ·