PDA

View Full Version : DateInput



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>

ddadmin
07-25-2006, 08:38 PM
Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

mahathi
07-28-2006, 04:53 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.

The thread that I made use is :


http://www.dynamicdrive.com/forums/showthread.php?t=9821

Thanks in advance.

Regards
Mahathi.