Open fabiomor opened 6 years ago
Had the same issue, the only way I could get it to work is by setting these values in the provider config options like this:
.config(['momentPickerProvider', function (momentPickerProvider) {
momentPickerProvider.options({
minutesStep: 15,
hoursStart:7,
hoursEnd:22
});
}])
I was able to achieve this by using min-date
and max-date
attributes on the moment-picker control. I set the format
attribute to 'HH:mm' and the min/max values to the times I wanted, e.g., "9:30", "14:25".
You can edit this plunk to see it in action.
fixed in #287
Hi, i'm trying to setup a timepicker for hours of the day but i can't manage to filter dynamically the start and the end of the hours of the day: The popup should be agnostic of the current day, just pick the given range of hours minutes of the day (in fact, i hould remove the title of the current day in the default timepicker dialog).
Here is an example:
<input class="form-control" moment-picker="sg.timepicker" format="HH:mm" hours-start="10" ng-model="sg.timepicker" ng-model-options="{ updateOn: 'blur' }">
Thanks in advance :)