@lion/calendar
Advanced tools
Comparing version 0.1.15 to 0.1.16
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.1.16](https://github.com/ing-bank/lion/compare/@lion/calendar@0.1.15...@lion/calendar@0.1.16) (2019-06-04) | ||
### Bug Fixes | ||
* **calendar:** init centralDate from selectedDate when today is disabled ([1643379](https://github.com/ing-bank/lion/commit/1643379)) | ||
## [0.1.15](https://github.com/ing-bank/lion/compare/@lion/calendar@0.1.14...@lion/calendar@0.1.15) (2019-05-31) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@lion/calendar", | ||
"version": "0.1.15", | ||
"version": "0.1.16", | ||
"description": "Standalone calendar", | ||
@@ -44,3 +44,3 @@ "author": "ing-bank", | ||
}, | ||
"gitHead": "f39b1e06fc52e3dc27e778d650c8654ddd8e787d" | ||
"gitHead": "6f515e6000e4921c0fe6beee128e072bea4fcce2" | ||
} |
@@ -377,3 +377,5 @@ import { html, LitElement } from '@lion/core'; | ||
__disableDatesChanged() { | ||
this.__ensureValidCentralDate(); | ||
if (this.__connectedCallbackDone) { | ||
this.__ensureValidCentralDate(); | ||
} | ||
} | ||
@@ -380,0 +382,0 @@ |
@@ -309,2 +309,18 @@ import { expect, fixture } from '@open-wc/testing'; | ||
}); | ||
it('does not prevent initializing "centralDate" from "selectedDate" when today is disabled', async () => { | ||
const clock = sinon.useFakeTimers({ now: new Date('2019/06/03').getTime() }); | ||
const el = await fixture(html` | ||
<lion-calendar | ||
.selectedDate="${new Date('2001/01/08')}" | ||
.disableDates=${day => day.getDate() === 3} | ||
></lion-calendar> | ||
`); | ||
const elObj = new CalendarObject(el); | ||
expect(isSameDate(el.centralDate, new Date('2001/01/08'))).to.be.true; | ||
expect(elObj.activeMonthAndYear).to.equal('January 2001'); | ||
clock.restore(); | ||
}); | ||
}); | ||
@@ -311,0 +327,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
109169
2901