Forum Moderators: open
<script language="vbscript">
<!--
filMonth = Month(Now)
filYear = Year(Date)
document.ViewForm.FilterMonth.value = filMonth
document.ViewForm.FilterYear.value = filYear
document.ViewForm.MonthChoice.value = filMonth
document.ViewForm.YearChoice.value = filYear
leapyearFilter = filYear mod 4
if document.ViewForm.MonthChoice.value = 2 then
if leapyearFilter = 0 then
dateEndDay = 29
elseif leapyearFilter > 0 then
dateEndDay = 28
end if
end if
if document.ViewForm.FilterYear.value = "2000" then
document.ViewForm.YearChoice.value = "00"
elseif document.ViewForm.FilterYear.value = "2001" then
document.ViewForm.YearChoice.value = "01"
elseif document.ViewForm.FilterYear.value = "2002" then
document.ViewForm.YearChoice.value = "02"
end if
if document.ViewForm.MonthChoice.value = "1" or + _
document.ViewForm.MonthChoice.value = "3" or + _
document.ViewForm.MonthChoice.value = "5" or + _
document.ViewForm.MonthChoice.value = "7" or + _
document.ViewForm.MonthChoice.value = "8" or + _
document.ViewForm.MonthChoice.value = "10" or + _
document.ViewForm.MonthChoice.value = "12" then
document.ViewForm.EDay.value = "31"
elseif document.ViewForm.MonthChoice.value = "2" then
document.ViewForm.EDay.value = dateEndDay
elseif document.ViewForm.MonthChoice.value = "4" or + _
document.ViewForm.MonthChoice.value = "6" or + _
document.ViewForm.MonthChoice.value = "9" or + _
document.ViewForm.MonthChoice.value = "11" then
document.ViewForm.EDay.value = "30"
end if
document.ViewForm.onStartYear.value = document.ViewForm.MonthChoice.value &"/1/"& document.ViewForm.YearChoice.value
document.ViewForm.onEndYear.value = document.ViewForm.MonthChoice.value &"/"& document.ViewForm.EDay.value &"/"& document.ViewForm.YearChoice.value
document.ViewForm.StartYear.value = document.ViewForm.MonthChoice.value &"/1/"& document.ViewForm.YearChoice.value
document.ViewForm.EndYear.value = document.ViewForm.MonthChoice.value &"/"& document.ViewForm.EDay.value &"/"& document.ViewForm.YearChoice.value
document.ViewForm.comStartYear.value = filMonth &"/1/"& filYear
document.ViewForm.comEndYear.value = filMonth &"/"& document.ViewForm.EDay.value &"/"& filYear
document.ViewForm.FinalDateNow.value = formatdatetime(document.ViewForm.DateNowValue.value,2)
document.ViewForm.FinalEndDateNow.value = formatdatetime(document.ViewForm.EndDateNowValue.value,2)
-->
</script>