javascript - Datatimepicker copy value in other Datatimepicker -
i want copy datatimepicker in other datatimepicker when change. value of first, can set new value in other datatimepicker.
<script type="text/javascript"> $('#to').datetimepicker({ format: 'dd/mm/yyyy hh:mm' }); $('#from').datetimepicker({ format: 'dd/mm/yyyy hh:mm' }); $('#from').change(function () { var date = $("#from").find("input").val(); alert(date); //in sentence can show right value $('#to').datetimepicker("setdate" , date); // sentence dont work :( }); </script>
Comments
Post a Comment