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 367 forks source link

Drop angular 1.2 support to take advantage of bindToController and $watchGroup #58

Closed mattlewis92 closed 9 years ago

mattlewis92 commented 9 years ago

First release 0.11.x but still preserving compatibility with ng 1.2.x, then release 0.12.0 that drops support for 1.2

$watchGroup is done, bindToController will be done after directive unit tests (https://github.com/mattlewis92/angular-bootstrap-calendar/issues/105) are done (perfect chance to take advantage of them!)

mattlewis92 commented 9 years ago

Also use $watchGroup in the main calendar directive which should remove the need for the debounce.

rossbg commented 9 years ago

Hey, when are you planning to release the next version?

mattlewis92 commented 9 years ago

Whenever I get a few spare hours to finish writing the unit tests. The API shouldn't be changing though and the docs are also done. If you want to use the master version here's the changelog from 0.9.x:

Changelog -Attributes have been renamed. To migrate simply drop the calendar- prefix -The starts_at and ends_at event properties have been renamed to startsAt and endsAt -The template paths have been changed (only affects users who were overriding the templates). They are now in src/templates. Also main.html has been renamed to calendar.html, day.html to calendarDay.html, week.html to calendarWeek.html, month to calendarMonth.html and year to calendarYear.html -The calendar-control attribute has been removed. From now on use the new view-title attribute for getting the title, and use the new mwl-date-modifier directive for the prev() and next() functions that existed before. -The following attributes have been renamed: event-click -> on-event-click, edit-event-click -> on-edit-event-click, delete-event-click -> on-delete-event-click, timespan-click -> on-timespan-click -The drill down functionality can now be disabled by returning false from the new on-drill-down-click expression rather than the timespan click expression. -The calendarConfig provider methods have been renamed like so: configureDateFormats -> setDateFormats and configureTitleFormats -> setTitleFormats -The use-iso-week attribute has been removed. From now on you should always set the option in moment instead: moment.locale('en', { week : { dow : 1 // Monday is the first day of the week } }); -The week-title-label, event-label and time-label attributes have been removed. You can configure them in the calendarConfigProvider instead.

VincentCheung1992 commented 9 years ago

TypeError: moment is not a function where is the function of moment in demo.js

mattlewis92 commented 9 years ago

Moment is a dependency, include it before your scripts: <script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.0/moment.min.js"></script>

VincentCheung1992 commented 9 years ago

hey in the function of Edit events, the Starts at is without datepicker

mattlewis92 commented 9 years ago

The datepicker isn't part of this library, you're probably not including the ui-bootstrap library

VincentCheung1992 commented 9 years ago

Your calendar is very beautiful and great. But your demo also can not use datepicker. I click the button but it can not response