- Fix
hasBlock
deprecation. - Dependencies updates.
- [BUGFIX] Update version of ember-element-helper for better embroider compatibility
- [ENHANCEMENT] Relax dependency on ember-truth-helpers.
- [ENHANCEMENT] Bump version of
element-closest-polyfill
to 0.0.2
- [BUGFIX] Don't set
center
to undefined in days component. Users may subclass it and define center as readonly.
- [ENHANCEMENT] Added support for optional
@tag
argument to<PowerCalendar />
- [BUGFIX] Remove deprecation by adding a setter for the locale to power-calendar service.
- [BUGFIX] Both
minDate
andmaxDate
should form part of the range and therefore be selectables.
- [ENHANCEMENT] The
<calendar.Nav>
component will display in thedata-power-calendar-id
the value ofcalendar.calendarUniqueId
if present (it not present, it will displaycalendar.uniqueId
as before)
- [BREAKING] Update addon to angle-bracket syntax. It requires Ember 3.11 now. The yielded components are
now capitalized (e.g.
<calendar.Nav>
).
- [CHORE] Allow ember-concurrency 1.0
- [BUGFIX] Make use of
$nav-button-color--focus
, which before wasn't really being used as intended. This makes it customizable.
- [BUGFIX] Fix bug detecting keyword in package.json
- [ENHANCEMENT] Detect EPC-adapters (like ember-power-calendar-luxon and ember-power-calendar-moment)
not using a whitelist, but looking for the keyword
ember-power-calendar-adapter
in their package.json
- [ENHANCEMENT] Update ember-concurrency to 0.9 for better octane support
Unsure
- [ENHANCEMENT] Allow range calendar's
actions.select
to take an range. It used to only allow a single day from which it constructed a the range. This hasn't change, but now if it receives a range it it will use that range it will use as is.
- [ENHANCEMENT] Allow pass a
@unit
and@format
to thecalendar.Nav
component, which used to be hardcoded values ('month'
and'MMMM YYYY'
respetively).
- [ENHANCEMENT] Allow multiple calendar's
actions.select
to take an array of days. It used to only allow a single day from which it constructed a new list. This hasn't change, but now if it receives a list it it will use that list as the final set of values.
- [CHORE] Minimum version of
ember-power-calendar-luxon
has to be 0.1.5 and ofember-power-calendar-moment
0.1.4. Some utility functions have been extracted there.
- [ENHANCEMENT]
{{#cal.days}}
yields the array of weeks as third argument.
- [ENHANCEMENT] Allow
{{cal.days}}
component to receive adayClass
property that can be either a string or a function that takes(day, calendar, weeks)
and returns a string. That string is added as a class to days.
- [ENHANCEMENT] Add
type
to public API. Possible values: "single" | "multiple" | "range" - [DOCS] Document public API object.
- [CHORE] Update dependencies, including babel 7
- [BUFIX] Fix 0.9.3 in versions of ember-cli >= 3.5
- [BUGFIX] Fix broken dependency check under yarn workspaces.
- [BUGFIX] Fix testing of ember-power-calendar from within a whormole to the root of the body.
- [BUGFIX] Prevent infinite loop rendering the days component
- [BREAKING] Now this addon requires the user to install either
ember-power-calendar-moment
orember-power-calendar-luxon
to work. However, once installed it should either of those, it should behave the same (obviously you won't ve able to pass moment object if you choose the luxon addon)
- [BUGFIX] Update minimum version of
ember-power-calendar-moment
to fix some bugs.
- [CHORE] 🎉🎉BIG CHANGE🎉🎉 Now the utility functions don't live on this addon but on another addon
named
ember-power-calendar-moment
, that for the time being is a runtime dependency so it shouldn't be breaking. In an upcoming version it will be removed from the runtime dependencies so user will have to explicitly install that other addon.
- [BREAKING] Require the new testing API based on
setupTest
/setupRenderingTest
/setupApplicationTest
that comes withember-qunit
3.2+.
-
[BREAKING] This addon no longer depends on
ember-moment
, only inember-cli-moment-shim
, which means it no longer attempts to read the locale from theservice:moment
. You can now set the locale (if different from the global moment.js locale) in theservice:power-calendar
. -
[HUGE REFACTOR] The addon is pretty decoupled from moment.js, with the plan of allowing using it with luxon.js, or other libraries (maybe without any library!) in the next version. It should not be a breaking change, but since it was a very big refactor, update it with care. Due to this refactor and the drop of ember-moment, the addon is ~28kb (~4.5kb min+gzip) smaller than before.
- [ENHANCEMENT] Add helpful assertions when a calendar receives an invalid date as center and when the user tries to change the center of a calendar without an
onCenterChange
action.
- [FEATURE] Add
proximitySelection
topower-calendar-range
. When true (default is false) the clicking on the calendar after a range has been selected doesn't start a new range, but moves the closest extreme of the current range, expanding or narrowing it.
- [INTERNAL] Update some testing deps
- [BREAKING] Require Ember >= 2.10
- [BUGFIX] Ensure
addon-test-support/
folder is not blacklisted in NPM
- [ENHANCEMENT] Now the
calendarCenter
andcalendarSelect
helpers are importable fromember-power-calendar/test-support
and can be used in both integration and acceptance tests. - [ENHANCEMENT] When the
moveCenter
action was called with anull
/undefined
value it could cause problems. Now doing that is perfectly legal and it will center the month in the current date.
- [ENHANCEMENT] Allow invocation without block. It renders both nav and days.
- [BUGFIX] Add
type="button"
to buttons in the nav so they are not implicitly considered type submit, leading to submitting the enclosing form. - [INTERNAL] The addon is now jQuery free too.
- [BREAKING] Allow the
ember-power-calendar
SASS/LESS mixin to take a lot more variables to customize colors and more. Potentially breaking, but probably not for the big majority.
- [INTERNAL] Update to Babel 6
- [BUGFIX] Broken safari styles due to unnecesary flex position on days.
- [ENHANCEMENT] Added less support.
- [BREAKING]
onSelect
andonCenterAction
now receive the publicAPI of the component as second argument and the event as third.
- [ENHANCEMENT]
data-ember-power-calendar-id
can be bound from the outside
- [ENHANCEMENT] Added an
onInit
action that can be passed from the outside, and it called with the public API once.
- [BREAKING] Renamed
service:power-calendar-clock
to justservice:power-calendar
. This service wasn't public, so it's unlikely anyone will be affected. - [ENHANCEMENT] Added
calendar.uniqueId
to the public API. The{{cal.days}}
use it to display adata-power-calendar-id
attribute that reference the original calendar. - [ENHANCEMENT] The
calendarCenter
andcalendarSelect
test helpers now also work with tagless calendars, thanks to the enhancement above.
- [ENHANCEMENT] Add
maxLength
to the{{cal.days}}
component of multiple selects. It determines the max number of day selections the user can make. Once that number is reached no more days can be selected, but those selected can be unselected. Defaults toInfinity
so there is no limit by default.
- [ENHANCEMENT] Allow to disable specific days passing
{{cal.days disabledDates=collection}}
. As usual the property can be a collection of Dates or Moments.
- [ENHANCEMENT] Improve default styles of calendar days.
- [ENHANCEMENT] Make Sass mixin more configurable, by accepting more variables. The basic usage remains the same, this is not breaking.
- [BREAKING] The component no longer automatically gets a
ember-power-calendar--loading
when theonCenterChange
returns a promise/task. Instead, the publicAPI of the component will have theloading
flag set to true, and you can use that to any purpose. This flag might change in future.
- [BUGFIX] Fix styles in IE11 - @nwhittaker
- [BUGFIX] Fix calculation of days when the
moment
global had a different locale than theservice:moment
.
- [BUGFIX] Make
ember-assign-helper
a runtime dependency.
- [FEATURE] Add
maxRange
to prevent users from selecting ranges > the given duration. - [FEATURE] Add
minRange
to prevent users from selecting ranges < the given duration. - [BUGFIX] If a range has
start
andend
in the same day, that day has both*--range-start
and*--range-end
classes. - [BREAKING] Rename
calendar.actions.changeCenter
tocalendar.actions.moveCenter
. - [BUGFIX] Clicking on the last selected day selected it twice instead of removing it.
- [FEATURE] Add
weekdayFormat
to customize the format of the weekdays. Values: "short" (default), "long" and "min".
- [FEATURE] Add
calendarCenter
andcalendarSelect
test-helpers for acceptnace testing.
- [FEATURE] Add
i18n
based in ember-moment.
- [FEATURE] Add
minDate
andmaxDate
to default<calendar.Days/>
component to disabled days before/after some specific date.