HTML Form How to - Control text direction for date input text








Question

We would like to know how to control text direction for date input text.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
input {<!--   ww  w .  j a  va  2 s.  co m-->
  text-align: right;
}
</style>
</head>
<body>
  <input type="text" placeholder="yyyy/MM/dd">
</body>
</html>

The code above is rendered as follows: