
Hi all,
may I know how to fix my calendar. I want it to disable next month at every first 3rd days
This is my code.
now = new Date()
myForm = document.form1.tarikhmula.value
inputDate = new Date()
inputDate.setDate(myForm.substring(0,myForm.indexOf("/")))
inputDate.setMonth(myForm.substring(myForm.indexOf("/")+1, myForm.lastIndexOf("/"))-1)
inputDate.setFullYear(myForm.substring(myForm.lastIndexOf("/")+1, myForm.length))
inputDate((now - 3) * -1).AddMonths(1)
if (inputDate>now)
{
alert('You can`t choose date every 3rd days at the next month')
return false
}
}