Tuesday, December 15, 2015

How to add textbox time picker html or SharePoint in jQuery?

In this below script, add textbox time picker html or SharePoint in jQuery/javascript

add textbox time picker html using jQuery In SharePoint
Sample code for added time picker in text.

Default option:


<input type="text" class="appe" />
<script type="text/javascript">
$(document).ready(function(){
$('.appe').timepicker();
});
</script>

More Options available in time-picker library:

$('.appe').timepicker({
        timeFormat: 'HH:mm:ss',    
        minTime: new Date(0, 0, 0, 8, 0, 0),
        maxTime: new Date(0, 0, 0, 15, 0, 0),    
        startHour: 6,    
        startTime: new Date(0, 0, 0, 8, 20, 0),
  interval: 10
    });


Please download the timepicker library below link.


https://github.com/jonthornton/jquery-timepicker

No comments:

Post a Comment