Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<link href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
    Fecha inicio: <input id = "fecharcon" readonly />
    Fecha final: <input id = "fecharpc" readonly />
</body>
</html>
 
$("#fecharcon").datepicker({
    onSelect: function(){
        inicio = $(this).datepicker("getDate");
        final = $(this).datepicker("getDate");
        final.setDate(final.getDate()+2);
        $("#fecharpc").datepicker({
          minDate: inicio,
          maxDate: final,
        });
    }
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
Alexis88pro
0viewers