nclarke1
Junior Member
Posts: 3
Registered: 9/11/2002
Member Is Offline
|
| posted on 9/18/2002 at 04:29 PM |
|
|
adding values to the date fields
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
Administrator
Posts: 1920
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 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
|
|
|