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

change hours-start dynamically #258

Open korengal opened 6 years ago

korengal commented 6 years ago

Hi, I need to change the hours-start property according to the place its implemented.

I saw that there is a way to change it to all the project:

momentPickerProvider.options({ hoursStart: 7, });

there is a way to change it only to specific component?

thanks.

eddiebrowne commented 5 years ago

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.

korengal commented 5 years ago

thanks, but I need the hours to disappear from the menu, its need to behave like in momentPickerProvider.options({ hoursStart: 7, }); functionality.