Date-bling
An ember-cli addon to display calendar month(s) using moment.js.
Usage
Single month
{{calendar-month month=currentMonth year=currentYear customClassFunction=oneMonthClassFunction}}
currentMonth: nullcurrentYear: null { this; this; } { let selectedDays = 1 2 3 5 8 13 21; if selectedDays && return 'selected'; }
Multiple months
{{calendar-month-multi startDate=today endDate=threeMonthsFromNow context=(hash startDate=today endDate=threeMonthsFromNow ) customClassFunction=threeMonthClassFunction}}
today: nullthreeMonthsFromNow: null { this; this;} { // pass anything you will need anything into this function in 'context' const startDate endDate = this; if date return 'start-date'; if date return 'end-date'; if date return 'selected'; }
Installation
In your application's directory:
ember install datetime-bling
Contributing
New features and bugfixes are welcome! Feel free to open a pull request.
Running Tests
npm test
(Runsember try:each
to test your addon against multiple Ember versions)ember test
ember test --server
Copyright and License
Code and documentation © Copyright 2017 Ryan Rishi. Code released under the MIT License;