@coreui/angular-pro 4.4.0-next.1 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/calendar/calendar/calendar.component.mjs +14 -8
- package/esm2020/lib/calendar/calendar-month/calendar-month.component.mjs +11 -5
- package/fesm2015/coreui-angular-pro.mjs +27 -11
- package/fesm2015/coreui-angular-pro.mjs.map +1 -1
- package/fesm2020/coreui-angular-pro.mjs +23 -11
- package/fesm2020/coreui-angular-pro.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1991,8 +1991,11 @@ class CalendarMonthComponent {
|
|
|
1991
1991
|
* @type (Date | null)
|
|
1992
1992
|
*/
|
|
1993
1993
|
set startDate(value) {
|
|
1994
|
-
|
|
1995
|
-
this.
|
|
1994
|
+
const date = !!value ? tryDate(value, 'startDate') : null;
|
|
1995
|
+
if (this._startDate?.getTime() !== date?.getTime()) {
|
|
1996
|
+
this._startDate = date;
|
|
1997
|
+
this.calendarService.update({ startDate: this._startDate });
|
|
1998
|
+
}
|
|
1996
1999
|
}
|
|
1997
2000
|
get startDate() {
|
|
1998
2001
|
return this._startDate;
|
|
@@ -2002,8 +2005,11 @@ class CalendarMonthComponent {
|
|
|
2002
2005
|
* @type (Date | null)
|
|
2003
2006
|
*/
|
|
2004
2007
|
set endDate(value) {
|
|
2005
|
-
|
|
2006
|
-
this.
|
|
2008
|
+
const date = !!value ? tryDate(value, 'endDate') : null;
|
|
2009
|
+
if (this._endDate?.getTime() !== date?.getTime()) {
|
|
2010
|
+
this._endDate = date;
|
|
2011
|
+
this.calendarService.update({ endDate: this._endDate });
|
|
2012
|
+
}
|
|
2007
2013
|
}
|
|
2008
2014
|
get endDate() {
|
|
2009
2015
|
return this._endDate;
|
|
@@ -2390,10 +2396,13 @@ class CalendarComponent {
|
|
|
2390
2396
|
* @type (Date | null)
|
|
2391
2397
|
*/
|
|
2392
2398
|
set startDate(value) {
|
|
2393
|
-
|
|
2394
|
-
this.
|
|
2395
|
-
|
|
2396
|
-
this.
|
|
2399
|
+
const date = !!value ? tryDate(value, 'startDate') : null;
|
|
2400
|
+
if (this._startDate?.getTime() !== date?.getTime()) {
|
|
2401
|
+
this._startDate = date;
|
|
2402
|
+
this.calendarService.update({ startDate: this._startDate });
|
|
2403
|
+
if (!this.range || !this._startDate || (this.endDate && this._startDate > this.endDate)) {
|
|
2404
|
+
this.endDate = null;
|
|
2405
|
+
}
|
|
2397
2406
|
}
|
|
2398
2407
|
}
|
|
2399
2408
|
get startDate() {
|
|
@@ -2404,9 +2413,12 @@ class CalendarComponent {
|
|
|
2404
2413
|
* @type (Date | null)
|
|
2405
2414
|
*/
|
|
2406
2415
|
set endDate(value) {
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2416
|
+
const date = !!value ? tryDate(value, 'endDate') : null;
|
|
2417
|
+
if (this._endDate?.getTime() !== date?.getTime()) {
|
|
2418
|
+
this._endDate = date;
|
|
2419
|
+
// this._endDate = this.range ? this._endDate : null;
|
|
2420
|
+
this.calendarService.update({ endDate: this._endDate });
|
|
2421
|
+
}
|
|
2410
2422
|
}
|
|
2411
2423
|
get endDate() {
|
|
2412
2424
|
return this.range ? this._endDate : null;
|