Closed cfiorini closed 9 years ago
Thank you! I'll take a look at this this weekend.
There is a problem with checking for presence of the library.
Thing is, if jQuery UI Datepicker is loaded, $.fn.datepicker
also returns a truthy value, a function, even though this is a wrong library. I wonder if there is a way to differentiate between jQuery UI Datepicker and Bootstrap-datepicker in $.fn.datepicker
?
Another issue is that it does not integrate into the autoreloading functionality of the plugin. Data autoreloading example: http://wicegrid.herokuapp.com/auto_reloads
Telling difference between jQuery UI Datepicker and Bootstrap datepicker is a nice-to-have, this one is more serious.
js check: i already tried to find a way to check if the right library is loaded but main problem is they have same name so i was thinking to check if a specific method exists...but is not the right way; i think that the best way is if those libraries hava a getter like .name with something more than datepicker. if those libraries are included through a gem is quite easy...that's why i suggest to use a gem in alert box :)
auto reloading: i'll change code for that
js check: ok, let it be so
auto reloading: thanks
just added auto_reload
I've merged it, but I changed the event from changeDate to hide, otherwise when the user modifies the date editing the field directly the page will be reloaded submitting an invalid date
btw bootstrap datepicker in detached filters were broken, I fixed it https://github.com/leikind/wice_grid/commit/0909cb5364d27225ebf11b414e0616ae295980c2
right! at next filter i'll check detached too
I have added bootstrap-datepicker-rails that can be chosen changing Wice::Defaults::HELPER_STYLE to :bootstrap. It's an early implementation but does the job. There is a support for I18n.locale and you have two fields instead icons. For sure there some bootstrap-datepicker options that will be nice to implement...but let's start with this one :)