RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Problems / Put automaticly end date when we select start date
Posted:  30 Jul 2015 06:11
I tried to incorporate this in the example code, but I have double the datepicker.
Here is the code that works well separated.
I wonder if someone has already managed to do the same thing
thank you

Code:


<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>jQuery UI Datepicker - Default functionality</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css">

<script>
  $(function() {
  $( "#sda" ).datepicker( {
      onSelect: function(date, picker){
      $("#eda").val(date);
     // alert(date);
                                      }
    } );
} )
</script>

</head>
<body>

<p>Start date: <input type="text" id="sda"></p>
<p>End Date: <input type="text" id="eda"></p>

</body>
</html>