Board Logo

adding values to the date fields
nclarke1 - 9/18/2002 at 04:29 PM

Hi,

The calendar inputs a date into a text box called StartDate. If I now want to create a new javascript value called weekStartDate is it possible to easily add 7 days onto the value in StartDate. Any help would be much appreciated.

Thanks


tigra - 9/19/2002 at 02:37 PM

1. read date from StartDate field into string variable
2. convert string variable to date object with parsing function that comes with the calendar
3. add 7 days with:
dt_value.setDate(dt_value.getDate() + 7);
4. convert date object to string with generating function that comes with the calendar
5. put string variable in second calendar constructor


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/