Make jquery timepicker perform same functions as a input box time?

look the date picker how its function wants same for time picker as well when someone select time from time picker its has to include in input fields of time but its giving me error dont know whats the error. also can i make both date and time picker design same?

here is demo link

here is only time demo link

ClockPicker doesn’t have an onSelect event. The afterDone event seems to be the appropriate one to use instead.

$(function() {
  var input = $('#input-a');
  input.clockpicker({
    afterDone: function() {
      var timeComponents = input.val().split(":");
      var Hoursz = timeComponents[0];
      var Minutesz = timeComponents[1];
	  
      $("form[name='testform']").find("input[name='Hours']").val(Hoursz);
      $("form[name='testform']").find("input[name='Minutes']").val(Minutesz);
    }
  });
});

thank you so much for helping me. can you help me out by below 2 things.
time picker is going out side than mobile with sometimes gives selection error as well.
can we add this library as for date and time → https://github.com/ripjar/material-datetime-picker

can we save user selected city name in browser with cookies or anything?

Yes - the documentation page shows that you need to use the close event instead though.

Yes indeed, this simple cookie framework makes it easier to deal with cookies.

I updated DateTime Picker and Cookies but not working maybe bcoz its my first ever attempt or something missing…

datetime library used : https://github.com/T00rk/bootstrap-material-datetimepicker

here demo : https://jsfiddle.net/mailna/13omzz2L/21/

I don’t have time today to delve deeply into this as I must shortly go, but the function parameter here is wrong, as it must be the dollar symbol instead.

		$(document).ready(function(DateTime)

The correct notation for this is:

jQuery(document).ready(function($) {
   // code in here
});

i tried it but its not working, i mean same it wont split selected date time into fields.
if this library is giving error we can use this simple jquery library as well https://github.com/mugifly/jquery-simple-datetimepicker

will update datetime picker later. any help on cookies for cityname? save last selection of city?

hello please help me out of storing city name cookie of user selected last time.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.