Hi
ALL
I want to display the alert when user enters the time less than the system time and date should be current date and if the date is greater than current date it should ignore the alert box.
Here is the code
<script type=“text/javascript”>
function check() {
var now = new Date(),
timeParts = document.contact_form.time.value.split(‘:’),
userTime = new Date();
var year = now.getFullYear();
var month =now.getMonth()+1;
var day = now.getDate();
var today = year+“-”+month+“-”+day;
var pickdate=document.contact_form.reqdate.value
userTime.setHours(timeParts[0]);
userTime.setMinutes(timeParts[1]);
if (userTime < now && pickdate == today)
{
alert('Please enter the time greater than current time');
}
}
</script>
Please help me out to solve the problem
Thanks
md.Samiuddin