Result Size: 625 x 664
x
 
<!DOCTYPE html>
<html>
<body>
<h2>Use select() to select the content of a Datetime Field</h2>
A datetime text field: <input type="datetime" id="myDatetime" value="2014-02-06T10:57Z">
<p>Click the button to select the content of the datetime field.</p>
<button type="button" onclick="myFunction()">Try it</button>
<script>
function myFunction() {
  document.getElementById("myDatetime").select();
}
</script>
</body>
</html>