I'm using datepair.js which can be found here http://jonthornton.github.io/Datepair.js/
I'm building a leave request calendar where the end user can select a particular date in one input field and a time in a separate input field. I'm looking for the best way to parse these two fields into a single date/time field for the db.
I have the following JSON
[startTime:12:30am, startDate:11/12/2015, endDate:11/12/2015]
and the following SimpleDateFormat
SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
SimpleDateFormat displayFormat = new SimpleDateFormat("HH:mm");
I know I can set the date by doing something like
new Date(sdf.parse(jsonObj.startDate))
But what is the best way to combine those dates?