mattlewis92 / angular-bootstrap-calendar

A port of the bootstrap calendar widget to AngularJS (no jQuery required!)
https://mattlewis92.github.io/angular-bootstrap-calendar/
MIT License
798 stars 369 forks source link

Set Background Color at Calendar Cell #577

Closed sky3913 closed 7 years ago

sky3913 commented 7 years ago

Hi, Is there a way how to set the calendar cell background color when I click the cell and how to set Saturday and Sunday background color in red at page load?

mattlewis92 commented 7 years ago

Here you go: http://plnkr.co/edit/IgfQEgPFWIETgtzX1QuO?p=preview Hope that helps!

sky3913 commented 7 years ago

Great... Thanks for your help

sky3913 commented 7 years ago

Hi matt, How to set the weekend individually? I have added 2 checkboxes, one for Saturday and Sunday, if I tick Saturday then all Saturday in this year will be red and if I uncheck it then it will be white. So does the Sunday.

How to make multiple selected date and keep the background color in red until it's clicked again? Also can we get the selected dates using a button click?

Thanks in advance

burtek commented 7 years ago

Can you provide code sample? What checkboxes did you add?

sky3913 commented 7 years ago

Here is the code: http://plnkr.co/edit/icdWZjkgk4IoHe7PQ63w?p=preview

There is also a year combobox to limit the calendar view, but I don't know how to make it.

graspsolutions commented 7 years ago

In a related extension to this question, can a day be selected from an external button? E.g. a button to return to the day of the current date and set its background color?

burtek commented 7 years ago

@sky3913 Please, have a look at issue #582, maybe you'll find your answer there.

@graspsolutions the button is standard button described here. As for setting it's background, have a look at issue #597.

shahksh1011 commented 6 years ago

HI Matt.Can I add background color to cells with particular date. For example I want to add bgcolor to 1st dec 2017, 5 dec 2017, 5th jan 2018,11 dec 2018??