I\'m creating an application which lets you define events with a time frame. I want to automatically fill in the end date when the user selects or changes the start date.
If you use Date objects and then use the getTime() function for both dates it will give you their respective times since Jan 1, 1970 in a number value. You can then get the difference between these numbers.
If that doesn't help you out, check out the complete documentation: http://www.w3schools.com/jsref/jsref_obj_date.asp