TheJuan Posted July 21, 2009 Share Posted July 21, 2009 I searched and searched but could not find a idea that can light me. if anyone point me to article or tutorial on this would be appreciated. i have two input textbox for dates, one is date borrowed which from date picker calendar 07/21/2009 and what i would like to make is the second textbox would be auto compute for X months the second input textbox would automatic display a value 01/21/2010 if i assign a 6 months variable more power. Link to comment https://forums.phpfreaks.com/topic/166747-adding-dates-on-second-input-box/ Share on other sites More sharing options...
dzelenika Posted July 21, 2009 Share Posted July 21, 2009 Try to parse date manually. If you are using leading zeroes it is trivial. Month is parseInt(datefield.substr(0,2)) Day is parseInt(datefield.substr(3,2)) Year is parseInt(datefield.substr(5,2)) Then increase month and check if greater than 11 (month is 0-11)... Concatenate parts ... Link to comment https://forums.phpfreaks.com/topic/166747-adding-dates-on-second-input-box/#findComment-879283 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.