indrimuska / angular-moment-picker

Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
http://indrimuska.github.io/angular-moment-picker/
MIT License
527 stars 229 forks source link

How do I force the control to only show hours and not allow editing of minutes and force minutes to always be 00? #274

Open vdevappa opened 5 years ago

vdevappa commented 5 years ago

<div class="input-group" moment-picker="ReportParams.TimeFrom" format="LT" min-view="day" max-view="day" show-header="false"> <span class="input-group-addon"> <i class="fa fa-clock-o"></i> </span> <input class="form-control" placeholder="{{ReportParams.TaskTimeFrom}}" ng-model="ReportParams.TaskTimeFrom" ng-model-options="{ updateOn: 'blur' }"> </div>

How do I configure this to just let me select the different hours in a day and not allow me to pick minutes?

With the above code, it lets me do that, but for some reason, it always selects the current time's minutes as the minute value. I just want to set it to 00 minutes by default and not allow the user to change the minute value.

ghost commented 5 years ago

You Can Do that with changing format to "HH:00"