angular-ui/bootstrap — pull request #1120 by ivogallego (2013-10-03 18:40:35+00:00)
Title: Datepicker refactor

This is a PR just for discussion, so don't expect it to be fully functional...

What I'm doing here, is trying to unify somehow all the configuration, because right now some of the config fields accessable from the datepicker directive aren't from the popup.

I've changed the the min and max attributes for their real name in the config file. I guess you already discussed about this, but as user of the library, I found it a mess having to know how to call the same parameter depending on where I'm calling it from.

As you can see, I did this functionality kind of global in order to share it as well with the datepicker directive, but the problem I'm currently having is that I don't know how to process the different behavior of each of the parameters in an elegant way... I'm a java/groovy developer who recently moved to Angular and JS, so I'm starting to read some books about JS and see if I kind find a pattern, or at least an idea of how could I do this... Any idea, even if you don't like the whole approach would be much more than welcome! :)

There's another thing I'd like to point out and is the datepickerOptions. We need to specify the properties in the attribute way (hyphen separated), but the 'Angular' way is to use camel-case format in JS and hyphen separated format for html, so I think is worth to convert the popup configuration before add it to the datepicker element in order to have consistency along all the APIs.

I know maybe there are a lot of breaking changes, but I always love consistency and I think this is an awesome library.which really deserves all my efforts.

P.D: sorry for doing this PR so late, but I've bee really busy this week and I wanted to explain myself in the best way I'm able to...