mahathi
07-25-2006, 11:26 AM
Hi
I used the following code to validate the DateInput function in my application by seeing the same in this site. But when I run the application it is not accepting even the current date. Can anyone provide me a help.
<script>DateInput('fromdate',true, 'DD-MM-YYYY')</script>
<script type="text/javascript">
function validateTheDate()
{
var DateOK = false;
var Today = new Date();
if (fromdate_Object.picked.date < Today) alert('Cannot select a date in the past.');
else if (fromdate_Object.picked.yearValue > 2020) alert('Cannot select a year in the future.');
else DateOK = true;
return DateOK;
}
</script>
I used the following code to validate the DateInput function in my application by seeing the same in this site. But when I run the application it is not accepting even the current date. Can anyone provide me a help.
<script>DateInput('fromdate',true, 'DD-MM-YYYY')</script>
<script type="text/javascript">
function validateTheDate()
{
var DateOK = false;
var Today = new Date();
if (fromdate_Object.picked.date < Today) alert('Cannot select a date in the past.');
else if (fromdate_Object.picked.yearValue > 2020) alert('Cannot select a year in the future.');
else DateOK = true;
return DateOK;
}
</script>