RLe
RLe

Reputation: 486

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

Upvotes: 0

Views: 1475

Answers (1)

rakemen
rakemen

Reputation: 348

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.

Upvotes: 1

Related Questions