Search code examples
angularjstimepickerbootstrap-datetimepicker

Angularjs timepicker dropdown


I tried to create to dropdown for timepicker using uib-dropdown in angularjs but it does not work. Also, in my input text box, I want to display 09:00:00 instead of Wed Mar 01 2017 09:00:00 GMT-0800 (Pacific Standard Time). Any help please?

plunker here

Thanks


Solution

  • Answer to the second part of your question. Use a filter for date formatting.

    Add this line of code:

    $scope.mytime = $filter('date')(new Date("2017-03-01 09:00:00"), 'mediumTime');
    

    I also added a $watch for the timePicker's model. Find the plunk here.