I'm working with html5 input types: date and time. How to convert the form input type to javascript object Date (that includes time in it)?
Here is a part of my code:
<html>
<head>
<script type="text/javascript">
function getDate(date, time)
{
var theDate = new Date();
....
}
</script>
</head>
<body>
<form name="form_task">
Date:<input type="date" name="task_date" />
Time:<input type="time" name="task_time" />
<input type="button" onclick="getDate(task_date.value, task_time.value)" />
</form>
</body>
</html>