alongubkin / angular-datepicker

Angular.js Date/Time Picker
MIT License
291 stars 129 forks source link

Passthrough options attr on directive to pickADate #14

Closed jonotron closed 10 years ago

jonotron commented 10 years ago

Adds pick-a-date-options and pick-a-time-options optional attribute to the directives which passes through to the pickADate object.

This allows for full configuration of the pickADate object.

jonotron commented 10 years ago

This is an initial PR as a suggested feature. As it stands, it works.

Question 1: Should the attribute name be changed to something else?

Question 2: If this is a good feature, should I wrap user provided onSet and onClose to also call the functions currently set?

Thoughts?

alongubkin commented 10 years ago

Initially I thought about adding a different attribute for each configuration property, such as min-date, max-date etc, but I guess using an options object is much more flexible.

And yeah, wrapping these callbacks is important imo

jonotron commented 10 years ago

Oh I hadn't expected to get this merged right away :) was planning to add onClose support and documentation.  I'll do up another PR next week to make it more complete. Do you want builds and version bump as part of the PR or will you handle that with ci?

On August 30, 2014 at 6:15:18 AM PDT, Alon Gubkin notifications@github.com wrote:Merged #14. —Reply to this email directly or view it on GitHub.

alongubkin commented 10 years ago

that would be great :) thanks!