1

I need to show time picker clock style inline in page. I've found this nice component: https://weareoutman.github.io/clockpicker But I can't configure out how to display it inline, so it will be visible immediately without clicking a selector. Can you suggest how to use this component or suggest other component to use?

10x

  • Maybe show some of your code so we can see what you've done? Is there something about the example on that page which does not work? If so, what is it? –  Apr 19 '16 at 14:57

1 Answers1

0

Yes, sure, this is my html code:

<div class="app-page" ng-controller="TimeController">


    <div class="input-group clockpicker" >
        <input id="selectedTimeInput" type="text" class="form-control" ng-model="selectedTime">
        <span class="input-group-addon">
            <span class="glyphicon glyphicon-time"></span>
        </span>
    </div>


 </div>

And controller:

var TimeSim = angular.module('TimeSim');

TimeSim.controller('TimeController', ['$scope', '$compile',     '$filter','$routeParams', 'InstanceService', function ($scope, $compile, $filter,$routeParams, InstanceService) {



$('.clockpicker').clockpicker({
    default:'now',
    donetext: 'Ok',
    init: function () {
      console.log("colorpicker initiated");
   }
});

  //set now hour and date
$scope.selectedTime  = $filter('date')(new Date(),'HH:mm');



}]);