12-14-2016, 05:52 PM
jQuery is loaded by default...every once in a while I have some sort of oddness with it.
I use this one and put the css in the users/css folder and js in the users/js folder.
http://trentrichardson.com/examples/timepicker
I can't remember if I HAVE to include jQuery UI, so it would be (at the top of the page)
At the bottom (in the scripts section)
<pre></pre>
<pre></pre>
Then you need to make sure that your date and time are formatted properly and in the same way as the db. A typical form form input would be...
I use this one and put the css in the users/css folder and js in the users/js folder.
http://trentrichardson.com/examples/timepicker
I can't remember if I HAVE to include jQuery UI, so it would be (at the top of the page)
Code:
<link rel="stylesheet" href="users/js/jquery-ui.min.css">Code:
<link rel="stylesheet" href="users/js/timepicker.css">At the bottom (in the scripts section)
Code:
<script src="users/js/external/jquery/jquery.js"></script>Code:
<script src="users/js/jquery-ui.min.js"></script>Code:
<script src="users/js/timepicker.js"></script>Code:
<script>Code:
$('#check_in').datetimepicker({
dateFormat: "yy-mm-dd"
});<pre>
Code:
$('#check_out').datetimepicker({
dateFormat: "yy-mm-dd"
});Code:
</script>Then you need to make sure that your date and time are formatted properly and in the same way as the db. A typical form form input would be...
Code:
<div class="form-group">Code:
<label for="name">Check Out*</label>Code:
<input type="text" class="form-control" name="check_out" id="check_out"Code:
value="<?php if(!empty($_POST)){echo Input::get('check_out');}?>"required>Code:
</div>
