gijgo icon indicating copy to clipboard operation
gijgo copied to clipboard

add showOnFocus for timepicker

Open GorvGoyl opened this issue 5 years ago • 1 comments

showOnFocus is supported for datepicker but not for timepicker. I hacked around and set $timepicker.open() whenever I focus on input box. Issue is clock opens but it is unstable and fluctuates between hour and minutes. When I click on the dedicated button then clock opens fine.

var timeEl = $(" .timepicker").timepicker({
        uiLibrary: "bootstrap4",
        format: "h:MM tt",
        modal: true,
        mode: "ampm"
      });
      $(" .timepicker").on("focus", function(e) {
        $(this).blur();
        timeEl.open();
      });

GorvGoyl avatar Mar 30 '20 15:03 GorvGoyl

$('.timepicker').on('focus', function() { $(this).siblings('.input-group-append').click(); });

i tried this & working fine. But i have another doubt, if i have 2 inputs and tries to select one timepicker to change it updates both the inputs! , what should we do for that ??

santhanakrishnanstark avatar May 07 '20 11:05 santhanakrishnanstark