Date Time Form Controls
Description
HTML5 provides several new input types to help collect date and time inputs. We now have time, date, month, week, datetime, and datetime-local input types.
Example
<!DOCTYPE html>
<html>
<head>
<meta name="viewport"
content="width=device-width, minimum-scale=1.0, maximum-scale=1.0;">
<link rel="stylesheet"
href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
</head><!--from ww w . j ava2s.c om-->
<body>
<div data-role="page">
<div data-role="header">
<h1>HTML5 Dates</h1>
</div>
<div data-role="content">
<form id="test" id="test" action="#" method="post">
<label for="time">Time:</label>
<input type="time" name="time" id="time" />
<label for="dtl">Datetime local:</label>
<input type="datetime-local" name="dtl" id="dtl" />
<label for="date">Date:</label>
<input type="date" name="date" id="date" />
<label for="month">Month:</label>
<input type="month" name="month" id="month" />
<label for="week">Week:</label>
<input type="week" name="week" id="week" />
<label for="dt">Datetime:</label>
<input type="datetime" name="dt" id="dt" />
</form>
</div>
</div>
</body>
</html>