Open danarmstrong opened 10 years ago
Hi,
Can you add your current code in a jsfiddle and share with me? Also, you might want to look at this project: http://mgcrea.github.io/angular-strap/
Here is a bare minimum example using the timepicker and datepicker. The selectbox goes a little deeper because I'm loading the options from an endpoint and the promises don't return until after the selectbox is created
http://jsfiddle.net/dan_armstrong/q88Fm/6/
After much playing around I managed to get two of the components working but the code is very ugly and the data-binding needs some work.
For the combo boxes though, it would be helpful to have a method to update the entire component or at least add options on the fly. Angular has very nice select directives built in but I'm not hopeful that they would ever work with your library.
Upon further review, it seems that the timepicker is still having a few issues. Sometimes the numbers between the selector and the input get out of sync. You can see this by
UPDATE: It appears that this doesn't happen in jsfiddle, but does happen in my angular application.
Looking at the timepicker code, I can see why I'm experiencing this. You are triggering the event before updating the value in nextHour(), nextMinute() and previousMinute(). However, previousHour() has the event coming after the value is set. I modified the sources for the previous 3 and my application behaves as expected. Would it be possible for you to correct this in the project?
After all of my attempts at creating angular directives, I simply cannot get formhelpers to work properly due to a couple of different factors. I will gladly purchase commercial licenses to support future development if angular support is added.