Hi
I have aproblem in that I need to enter a date in format dd/mm/yy into a web page text box and on same form another text box should fill out 10 days in furure.
If some one can help me I would be most appreciated.
In vbscript I can do it easily but client side scripting of dates has me beat.
Don
Thanks havik
I tried it but get the same, I really an desperate but dont have clue about java script.
I have this and it works kind of but does not take into accounts month length and on 2,4,8,11 month it adds a month and 10 days.
I really appreciate your help....
<script type="text/javascript" language="JavaScript">
<!-- HIDE FROM OLD BROWSERS
function validateInput(x){
oldd="Inputstring: "+x+"<br>";
a=x.split('/');
oldy=1*a[2] ;
// 1* makes a numbervalue from a string
if (oldy<35) oldy+=2000;
if (oldy<100) oldy+=1900;
// 1- or 2-number year split at 1935
I test the code yesterday and there were problems, today though it runs perfectly. None of the months add a month and ten days and it even accounts for the end of each month, even February. I didn't really change the code at all, I just added a few parenthesis for my own sake and that's all.
If this doesn't work on your computer then something is up with the dates. In this case, it's probably the current date that is messing around with this script somehow.
Havik
<script type="text/javascript" language="JavaScript">
<!-- HIDE FROM OLD BROWSERS
function validateInput(x){
oldd="Inputstring: "+x+"<br>";
a=x.split('/');
oldy=1*a[2] ;
// 1* makes a numbervalue from a string
if (oldy<35) oldy+=2000;
if (oldy<100) oldy+=1900;
// 1- or 2-number year split at 1935
Bookmarks