Sorry for late response.. You're right, there is no "NewForm.aspx" on document libraries.
So what can you do is adding the following javascript to the "EditForm.aspx" file of the related document library. You've to edit "EditForm.aspx" file in advanced mode by using SharePoint Designer. Add these code after PlaceHolderPageTitleInTitleArea tag.
In your document library one single line of text field (called as Month in my code) and a Datetime field (called as Day in my code).
This javascript first hides the textfield for Month field and shows a dropdown list that includes last three months.
Probably you've to optimize the javascript code :) But I tried it in my environment, it works.
<script type="text/javascript">
_spBodyOnLoadFunctionNames.push("addItemsToCombo");
var month = new Array();
month[0] = "January";
month[1] = "February";
month[2] = "March";
month[3] = "April";
month[4] = "May";
month[5] = "June";
month[6] = "July";
month[7] = "August";
month[8] = "September";
month[9] = "October";
month[10] = "November";
month[11] = "December";
function addItemsToCombo()
{
var today = new Date();
var inputs = document.getElementsByTagName("input");
for (i=0; i<inputs .length; i++)
{
if (inputs[i].getAttribute("Title")=="Month")
{
inputs[i].setAttribute("style","display:none;");
var select = document.createElement("select");
select.setAttribute("name","tempMonth");
select.setAttribute("id","tempMonth");
var currentMonth = today.getMonth();
var currentYear = today.getFullYear();
var option = document.createElement("option");
option.innerHTML = "Select";
option.setAttribute("value", "");
select.appendChild(option);
for(j=0; j<6; j++)
{
var option = document.createElement("option");
if (currentMonth<0)
{
option.innerHTML = month[currentMonth+12] + " " + (currentYear -1);
option.setAttribute("value", currentMonth +12 + " " + (currentYear -1));
}
else
{
option.innerHTML = month[currentMonth] + " " + currentYear;
option.setAttribute("value", currentMonth + " " + currentYear);
}
select.appendChild(option);
currentMonth = currentMonth-1;
}
select.onchange = function() {monthChange();};
inputs[i].parentElement.appendChild(select);
}
}
}
function monthChange()
{
var combo = document.getElementById("tempMonth");
var inputs = document.getElementsByTagName("input");
for (i=0; i<inputs .length; i++)
{
if (inputs[i].getAttribute("Title")=="Month")
{
inputs[i].value = combo.options[combo.selectedIndex].text;
}
if (inputs[i].getAttribute("Title")=="Day")
{
var selectedMonthYear = combo.value.split(" ");
var mm = parseInt(selectedMonthYear[0]) + 1;
var yyyy = selectedMonthYear[1];
if (mm<10)
{
mm = "0"+mm;
}
var firstOfMonth = "01/"+mm+"/"+yyyy;
inputs[i].value = firstOfMonth;
inputs[i].setAttribute("disabled","disabled");
}
}
}
</script>