Skip to content
This repository has been archived by the owner on Jun 19, 2018. It is now read-only.

Allow the event colors to be specified on the event object #402

Closed
mattlewis92 opened this issue Jul 26, 2016 · 13 comments
Closed

Allow the event colors to be specified on the event object #402

mattlewis92 opened this issue Jul 26, 2016 · 13 comments

Comments

@mattlewis92
Copy link
Owner

No description provided.

@saulojg
Copy link

saulojg commented Jul 26, 2016

Just a (pretty obvious) comment, this enhancement might be related to the incrementsBadgeTotal attribute.

@Gamester2097
Copy link

I understand that you want to add the possibility to define the event's color customly instead of just having to choose one of the provided types? Is that correct, because that would be super awesome! 👍

@mattlewis92
Copy link
Owner Author

Yup that's right, I've already implemented it in the angular2 version so it makes sense to backport it.

@Gamester2097
Copy link

Oh man, that's super awesome! Just this morning I was thinking about writing you a feature request about exactly that function woohoo! 👍 👍

@artforlife
Copy link

Big props for making this happen! If I update through bower or npm will this change be available?

@mattlewis92
Copy link
Owner Author

Yup it's in 0.22: https://github.com/mattlewis92/angular-bootstrap-calendar/blob/master/CHANGELOG.md#0220-2016-07-27

@artforlife
Copy link

artforlife commented Aug 1, 2016

Excellent! Also, I am just curious about the "src" directory within the project. What does it contain and for what purpose? I seem to only be including the files from "dist" and have things working as expected.

Lastly, is it realistic to have dynamic change of colors for calendar events? That is, can I somehow set the colors dynamically AFTER populating the calendar with events? Should I be rewriting the entire JSON to the calendar or just cherry-picking a certain entry from it? Would it update without refresh?

@mattlewis92
Copy link
Owner Author

src contains the source code, dist contains the built bundled files i.e. I use webpack to bundle all the files together, otherwise you wouldn't be able to use the files in the browser as require doesn't exist.

Changing the colors after creating the events should work, in fact you can see it in the demo (scroll to the event editor at the end and change the primary color of an event to see it update: https://mattlewis92.github.io/angular-bootstrap-calendar/#?example=kitchen-sink)

@artforlife
Copy link

I have another related question. If you were to try changing events in the calendar dynamically, would you just address the vm.events array and change the appropriate entry? I am wondering about the most efficient way of doing it.

@mattlewis92
Copy link
Owner Author

Yup, the events array is deep watched by angular so any changes you make to it will be automatically reflected in the calendar.

@luigipereira
Copy link

When I make a change in an event, the calendar makes the change, but when when I go back to edit the same event, the data is old. How can I update data from a certain event and see them updated on the form?

@mattlewis92
Copy link
Owner Author

I can't reproduce this, can you make a plunker? (You can generate one from any of the demos)

On 11 Oct 2016, at 17:53, luigipereira [email protected] wrote:

When I make a change in an event, the calendar makes the change, but when when I go back to edit the same event, the data is old. How can I update data from a certain event and see them updated on the form?


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.

@luigipereira
Copy link

Hello Matt. I already solve the problem. It's already working. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants