Hello, what I want to do is that by clicking on the input the calendar that shows start in the year 1900 as the default but do not show the date in the input before selecting a date, try with value but that shows the date without having selected.
Hello, what I want to do is that by clicking on the input the calendar that shows start in the year 1900 as the default but do not show the date in the input before selecting a date, try with value but that shows the date without having selected.
Here's an example with jQuery if you want to use Js:
$.datepicker.setDefaults($.datepicker.regional["es"]);
$("#datepicker").datepicker({
firstDay: 1
});
$("#datepicker").click(function () {
$("#datepicker").datepicker("setDate", "-117y");
});
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>jQuery UI Datepicker - Año Fijo</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
<script src="jquery.ui.datepicker-es.js"></script>
</head>
<body>
Fecha:
<div >
<input id="datepicker"></input></div>
<hr />
</body>
</html>
You must use onClick and at least one line of JavaScript. Example
<input id="fecha" type="date" onclick="this.value = '1900-01-01';"/>