Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: adding values to the date fields
nclarke1
Junior Member

Posts: 3
Registered: 9/11/2002
Member Is Offline
posted on 9/18/2002 at 04:29 PM Reply With Quote
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
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 9/19/2002 at 02:37 PM Reply With Quote

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
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Free Download Free Download
Product Documentation Documentation
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004