g1eb / angular-datetime-range

📅 Angular directive for datetime range input
https://rawgit.com/g1eb/angular-datetime-range/master/
MIT License
25 stars 14 forks source link

How to access values of the datetime-range #11

Closed madanaman closed 6 years ago

madanaman commented 6 years ago

Hi, is there a possiblity of specifying ng-model so that the start and end values can be used? Secondly, can the dates prior to start date be disabled in the end date selector?

Thanks, Aman

g1eb commented 6 years ago

Hi! Originally these components were not designed to be used with ng-model and as such are not compatible with it. They do offer the same level of two-way binding of data though :)

What is the specific use case you have for using the ng-model directive?

Your second question sounds like a feature request, what do you mean with disabled? Currently the dates outside the range of start and end date are not allowed, e.g. you can click on a date before the selected start date but it won't get set.

madanaman commented 6 years ago

We are planning to build a notification system, wherein notification start and end datetime is selected by Admin. So I was planning to use your implementation, and hence the need to get the value selected by the user. So I am now using "start" and "end" variables to get the selected value. Its solved 👍

g1eb commented 6 years ago

Great! Glad it worked out :)