Bootstrap Timepicker

Home Forums Porto – Responsive HTML5 Template Bootstrap Timepicker

  • This topic has 4 replies, 2 voices, and was last updated 1 week, 6 days ago by TonyA. This post has been viewed 97 times
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #10045213
    TonyA
    Participant

    Hi, included in the vendor files was the Bootstrap-Timepicker but I can’t seem to get it to work correctly. Is there some basic mark up html in the forum?

    This is how I am marking it up in asp.net, but it just doesn’t work

    <div class=”input-group”>
    <asp:TextBox ID=”txtShowTime” data-plugin-timepicker runat=”server” CssClass=”form-control” TabIndex=”3″></asp:TextBox>
    <div class=”input-group-text “>
    <span class=””><i class=”fa-regular fa-clock”></i></span>
    </div>



    Template Version: 11
    #10045214
    Support
    Keymaster

    Hello, you can see an example of that in this page:
    https://www.okler.net/previews/porto/12.0.0/demo-auto-services-appointment.html

    Documentation: https://jdewit.github.io/bootstrap-timepicker

    HTML:

    <input type="text" id="timePickerTest" class="form-control">

    JS:
    (js/custom.js)

    (function($) {
    	$('#timePickerTest').timepicker({
    		disableMousewheel: true,
    		icons: {
    			up: 'fas fa-chevron-up',
    			down: 'fas fa-chevron-down'
    		},
    		showSeconds: true,
    		showMeridian: false
    	});
    }).apply(this, [jQuery]);

    More options can be found in this link: http://jdewit.github.io/bootstrap-timepicker/


    • This reply was modified 2 weeks ago by Support.
    • This reply was modified 2 weeks ago by Support.
    #10045217
    TonyA
    Participant

    Thanks, that works. Does it only work on the text field? Is there a way to get the font-awesome clock icon to popup the time widget as well as clicking the text field? This function worked in both areas in the previous Okler version with Bootstrap 3.7. I tried input-group-addon but it doesn’t work.


    #10045218
    Support
    Keymaster

    HTML:

    <div class="input-group mb-3">
      <input id="timepicker1" type="text" class="form-control">
      <span class="input-group-text" id="timepicker1Clock"><i class="fa-regular fa-clock"></i></span>
    </div>

    JS:

    (function($) {
    	$('#timepicker1').timepicker({
    		disableMousewheel: true,
    		icons: {
    			up: 'fas fa-chevron-up',
    			down: 'fas fa-chevron-down'
    		},
    		showSeconds: true,
    		showMeridian: false
    	});
    	
    	$('#timepicker1Clock').on('click', function() {
    		$('#timepicker1').focus();
    	});	
    	
    }).apply(this, [jQuery]);

    #10045219
    TonyA
    Participant

    Excellent, than you!


Viewing 5 posts - 1 through 5 (of 5 total)

This topic is marked as "RESOLVED" and can not rceive new replies.