Skip to content
jQuery dateTimePIcker plugin with bugfix
JavaScript
Find file
Pull request Compare This branch is 11 commits ahead of softmechanics:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
images
README
jquery.ui.core.js
jquery.ui.datetimepicker.css
jquery.ui.datetimepicker.js

README


How to use datetimepicker in code.
1. Add this jquery.ui.datetimepicker.js file in your project
2. Add datepicker.css file in your stylesheet

1. Example1

<input type='text' id='date_time' name='date_time'></input>

<script type='text/javascript'>
  $(document).ready(function(){
 $('#date_time').datetimepicker();
});
</script>

This will call datetimepicker onclick of input field.

2.Example2
  By default select specified date 

 <input type='text' id='date_time' name='date_time'></input>
<script type='text/javascript'>
  $(document).ready(function(){
 $('#date_time').datetimepicker({
    defaultDate : new Date(2012,07,01)
});
});
</script>

3.Example3
  By default select specified time
$('#date_time').datetimepicker({
   hour : 8,
   minute : 30,
   ampm : 'PM'
});

4. Example 4
  Disable previous dates.

    var date = new Date();
    var m = date.getMonth();
    var d = date.getDate();
    var y = date.getFullYear();
  $('#date_time').datetimepicker({
     minDate : new Date(y, m, d)
  });






Something went wrong with that request. Please try again.