@zeedhi/zd-calendar-common 1.7.2 → 1.7.3
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.
|
@@ -114,7 +114,8 @@ class Calendar extends ComponentRender {
|
|
|
114
114
|
if (!this.value)
|
|
115
115
|
this.goToToday();
|
|
116
116
|
}
|
|
117
|
-
goToToday() {
|
|
117
|
+
goToToday(element, event) {
|
|
118
|
+
this.callEvent('clickToday', { event, element, component: this });
|
|
118
119
|
const fmt = FormatterParserProvider.getFormatter('ZdDateTime');
|
|
119
120
|
if (this.now) {
|
|
120
121
|
this.value = fmt(this.now, { dateTimeFormat: 'YYYY-MM-DD HH:mm:ss', displayFormat: 'YYYY-MM-DD' });
|
|
@@ -117,7 +117,8 @@
|
|
|
117
117
|
if (!this.value)
|
|
118
118
|
this.goToToday();
|
|
119
119
|
}
|
|
120
|
-
goToToday() {
|
|
120
|
+
goToToday(element, event) {
|
|
121
|
+
this.callEvent('clickToday', { event, element, component: this });
|
|
121
122
|
const fmt = core.FormatterParserProvider.getFormatter('ZdDateTime');
|
|
122
123
|
if (this.now) {
|
|
123
124
|
this.value = fmt(this.now, { dateTimeFormat: 'YYYY-MM-DD HH:mm:ss', displayFormat: 'YYYY-MM-DD' });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeedhi/zd-calendar-common",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.3",
|
|
4
4
|
"description": "Powered by Zeedhi",
|
|
5
5
|
"main": "dist/calendar-common.umd.js",
|
|
6
6
|
"module": "dist/calendar-common.esm.js",
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"@zeedhi/common": "^1.57.0",
|
|
24
24
|
"@zeedhi/core": "^1.57.0"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "babf9128218e441b057767e218a90828a40b8cfb"
|
|
27
27
|
}
|
package/types/calendar.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ComponentRender } from '@zeedhi/common';
|
|
2
2
|
import { ICalendar, CalendarEvents, ICalendarEvents } from './interfaces';
|
|
3
3
|
export declare class Calendar extends ComponentRender implements ICalendar {
|
|
4
|
-
showHeader?: boolean;
|
|
5
4
|
title?: string;
|
|
5
|
+
showHeader?: boolean;
|
|
6
6
|
categories?: string | [];
|
|
7
7
|
categoryDays?: number | string;
|
|
8
8
|
categoryForInvalid?: string;
|
|
@@ -64,7 +64,7 @@ export declare class Calendar extends ComponentRender implements ICalendar {
|
|
|
64
64
|
*/
|
|
65
65
|
events: ICalendarEvents;
|
|
66
66
|
constructor(props: ICalendar);
|
|
67
|
-
goToToday(): void;
|
|
67
|
+
goToToday(element?: any, event?: Event): void;
|
|
68
68
|
beforeNext(element: any, event?: Event): void;
|
|
69
69
|
/**
|
|
70
70
|
* Event triggered when the current slide changes.
|
package/types/interfaces.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export interface ICalendarEvents<T = ICalendarEventParam | IEventParam<any>> ext
|
|
|
34
34
|
clickInterval?: IEvent<T> | string;
|
|
35
35
|
clickTime?: IEvent<T> | string;
|
|
36
36
|
clickTimeCategory?: IEvent<T> | string;
|
|
37
|
+
clickToday?: IEvent<T> | string;
|
|
37
38
|
moved?: IEvent<T> | string;
|
|
38
39
|
}
|
|
39
40
|
export declare type CalendarEvents = {
|