Skip to content

Conversation

@marco-gagliardi
Copy link

@marco-gagliardi marco-gagliardi commented May 10, 2016

Programmatically extend a day's box style in the calendar, providing css class(es) to the date-object within your beforeRender function.

Example

Controller:

$scope.beforeRenderFunc = function ($view, $dates, $leftDate, $upDate, $rightDate) { var index = Math.floor(Math.random() * $dates.length); $dates[index].class="bg-success"; } 

View:

<datetimepicker data-before-render="beforeRenderFunc($view, $dates, $leftDate, $upDate, $rightDate)" /> 

Result:

schermata 2016-05-12 alle 16 02 47

@dalelotts
Copy link
Owner

Thanks for the PR - this is an interesting change. Closing because all PR's must be submitted to develop branch.

Can this be accomplished without changing the code? Maybe a custom template and the same beforeRender function?

@dalelotts dalelotts closed this Jul 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants