The following script works on all browsers and devices, but since the release of iOS 5 on the iphone, it no longer works.
The following code calculates dates into inputs so I can send them in a form. However, now the dates show up as NaN.
Cant see why.
        function makeUpDates(){
            // concantenate values to date_start and date_end hidden inputs
            var dateString = document.getElementById('date').value,
            date = new Date(dateString);
            document.getElementById('date_start').value = date.getFullYear() + '-' + (date.getMonth()+1) + '-' + ("0" + date.getDate()).slice(-2);
            var numDays = document.getElementById('slider').value;
            date.setDate(date.getDate() + parseInt(numDays));   
            var dateEnd = date.getFullYear() + '-' + (date.getMonth()+1) + '-' + ("0" + date.getDate()).slice(-2);
            document.getElementById('date_end').value = dateEnd;
        }
 
    