@lemonadejs/calendar 3.0.3 → 3.1.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/README.md +78 -81
- package/dist/index.d.ts +35 -24
- package/dist/index.js +793 -790
- package/dist/react.d.ts +13 -0
- package/dist/react.js +37 -31
- package/dist/style.css +230 -230
- package/dist/vue.d.ts +15 -0
- package/dist/vue.js +45 -32
- package/package.json +23 -23
package/README.md
CHANGED
|
@@ -1,81 +1,78 @@
|
|
|
1
|
-
# LemonadeJS Calendar
|
|
2
|
-
|
|
3
|
-
[Official website and documentation is here](https://lemonadejs.net/components/calendar)
|
|
4
|
-
|
|
5
|
-
Compatible with Vanilla JavaScript, LemonadeJS, React, Vue or Angular.
|
|
6
|
-
|
|
7
|
-
The LemonadeJS Calendar Component is a lightweight and agile calendar solution that empowers developers with efficient date management capabilities. With seamless navigation between months and years, intuitive day selection, and the ability to attach values and events, this highly customizable component provides a versatile foundation for scheduling applications, booking systems, and more. Its optimized codebase ensures fast performance, while its responsive design guarantees a consistent user experience across devices. Streamline your date management with the LemonadeJS Calendar Component and unlock enhanced productivity for your users.
|
|
8
|
-
|
|
9
|
-
## Features
|
|
10
|
-
|
|
11
|
-
- Lightweight: The JavaScript Calendar is only about 2 KBytes;
|
|
12
|
-
- Integration: It can be used as a standalone library or integrated with any modern framework;
|
|
13
|
-
|
|
14
|
-
## Getting Started
|
|
15
|
-
|
|
16
|
-
You can install using NPM or using directly from a CDN.
|
|
17
|
-
|
|
18
|
-
### npm Installation
|
|
19
|
-
|
|
20
|
-
To install it in your project using npm, run the following command:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
$ npm install @lemonadejs/calendar
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
### CDN
|
|
27
|
-
|
|
28
|
-
To use calendar via a CDN, include the following script tags in your HTML file:
|
|
29
|
-
|
|
30
|
-
```html
|
|
31
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lemonadejs/dist/lemonade.min.js"></script>
|
|
32
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@lemonadejs/calendar/dist/index.min.js"></script>
|
|
33
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lemonadejs/calendar/dist/style.min.css" />
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Usage
|
|
37
|
-
|
|
38
|
-
Quick example with Lemonade
|
|
39
|
-
|
|
40
|
-
```javascript
|
|
41
|
-
import Calendar from "@lemonadejs/calendar";
|
|
42
|
-
import "@lemonadejs/calendar/dist/style.css"
|
|
43
|
-
|
|
44
|
-
export default function App() {
|
|
45
|
-
const self = this;
|
|
46
|
-
|
|
47
|
-
return `<Calendar />`;
|
|
48
|
-
}
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Configuration
|
|
52
|
-
|
|
53
|
-
You can configure things such as calendar starting date, calendar events, and customize functions.
|
|
54
|
-
|
|
55
|
-
#### Calendar Properties
|
|
56
|
-
|
|
57
|
-
| Property | Type | Description |
|
|
58
|
-
| -------- | ---- | ----------- |
|
|
59
|
-
| value | date | The value currently attached to the calendar. |
|
|
60
|
-
| range |
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
65
|
-
### Calendar Events
|
|
66
|
-
|
|
67
|
-
| Event | Type | Description |
|
|
68
|
-
| -------- | ---- | ----------- |
|
|
69
|
-
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
- [jSuites](https://jsuites.net/v4/)
|
|
81
|
-
- [Jspreadsheet](https://jspreadsheet.com)
|
|
1
|
+
# LemonadeJS Calendar
|
|
2
|
+
|
|
3
|
+
[Official website and documentation is here](https://lemonadejs.net/components/calendar)
|
|
4
|
+
|
|
5
|
+
Compatible with Vanilla JavaScript, LemonadeJS, React, Vue or Angular.
|
|
6
|
+
|
|
7
|
+
The LemonadeJS Calendar Component is a lightweight and agile calendar solution that empowers developers with efficient date management capabilities. With seamless navigation between months and years, intuitive day selection, and the ability to attach values and events, this highly customizable component provides a versatile foundation for scheduling applications, booking systems, and more. Its optimized codebase ensures fast performance, while its responsive design guarantees a consistent user experience across devices. Streamline your date management with the LemonadeJS Calendar Component and unlock enhanced productivity for your users.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- Lightweight: The JavaScript Calendar is only about 2 KBytes;
|
|
12
|
+
- Integration: It can be used as a standalone library or integrated with any modern framework;
|
|
13
|
+
|
|
14
|
+
## Getting Started
|
|
15
|
+
|
|
16
|
+
You can install using NPM or using directly from a CDN.
|
|
17
|
+
|
|
18
|
+
### npm Installation
|
|
19
|
+
|
|
20
|
+
To install it in your project using npm, run the following command:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
$ npm install @lemonadejs/calendar
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### CDN
|
|
27
|
+
|
|
28
|
+
To use calendar via a CDN, include the following script tags in your HTML file:
|
|
29
|
+
|
|
30
|
+
```html
|
|
31
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lemonadejs/dist/lemonade.min.js"></script>
|
|
32
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@lemonadejs/calendar/dist/index.min.js"></script>
|
|
33
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@lemonadejs/calendar/dist/style.min.css" />
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Usage
|
|
37
|
+
|
|
38
|
+
Quick example with Lemonade
|
|
39
|
+
|
|
40
|
+
```javascript
|
|
41
|
+
import Calendar from "@lemonadejs/calendar";
|
|
42
|
+
import "@lemonadejs/calendar/dist/style.css"
|
|
43
|
+
|
|
44
|
+
export default function App() {
|
|
45
|
+
const self = this;
|
|
46
|
+
|
|
47
|
+
return `<Calendar type="inline" />`;
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Configuration
|
|
52
|
+
|
|
53
|
+
You can configure things such as calendar starting date, calendar events, and customize functions.
|
|
54
|
+
|
|
55
|
+
#### Calendar Properties
|
|
56
|
+
|
|
57
|
+
| Property | Type | Description |
|
|
58
|
+
| -------- | ---- | ----------- |
|
|
59
|
+
| value | date | The value currently attached to the calendar. |
|
|
60
|
+
| range | Boolean | Activates the range mode in the calendar, enabling users to select two dates and represent the range between them as a value. |
|
|
61
|
+
| type | string | Specifies the parameters for controlling the rendering behavior of the calendar. |
|
|
62
|
+
| numeric | boolean | Enables the use of numeric dates, treating them as serial numbers. |
|
|
63
|
+
| input? | HTML element | An optional reference to control the calendar opening. The value is automatically bound when using this property. |
|
|
64
|
+
|
|
65
|
+
### Calendar Events
|
|
66
|
+
|
|
67
|
+
| Event | Type | Description |
|
|
68
|
+
| -------- | ---- | ----------- |
|
|
69
|
+
| onupdate?: (self, value) => void | Called when a new date is selected. |
|
|
70
|
+
|
|
71
|
+
## License
|
|
72
|
+
|
|
73
|
+
The [LemonadeJS](https://lemonadejs.net) Calendar is released under the MIT.
|
|
74
|
+
|
|
75
|
+
## Other Tools
|
|
76
|
+
|
|
77
|
+
- [jSuites](https://jsuites.net/v4/)
|
|
78
|
+
- [Jspreadsheet](https://jspreadsheet.com)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,35 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Official Type definitions for LemonadeJS plugins
|
|
3
|
-
* https://lemonadejs.net
|
|
4
|
-
* Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Official Type definitions for LemonadeJS plugins
|
|
3
|
+
* https://lemonadejs.net
|
|
4
|
+
* Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
declare function Calendar(el: HTMLElement, options?: Calendar.Options): Calendar.Instance;
|
|
8
|
+
|
|
9
|
+
declare namespace Calendar {
|
|
10
|
+
interface Options {
|
|
11
|
+
/** Range picker */
|
|
12
|
+
range?: boolean;
|
|
13
|
+
/** Calendar type */
|
|
14
|
+
type?: 'default' | 'inline';
|
|
15
|
+
/** Calendar value will be a excel-like number or a ISO string. Default false */
|
|
16
|
+
numeric?: boolean;
|
|
17
|
+
/** Value */
|
|
18
|
+
value?: number | string;
|
|
19
|
+
/** Bind the calendar to na HTML input element */
|
|
20
|
+
input?: HTMLElement;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface Instance {
|
|
24
|
+
/** Range picker */
|
|
25
|
+
range?: boolean;
|
|
26
|
+
/** Calendar type */
|
|
27
|
+
type?: 'default' | 'inline';
|
|
28
|
+
/** Calendar value will be a excel-like number or a ISO string. Default false */
|
|
29
|
+
numeric?: boolean;
|
|
30
|
+
/** Value */
|
|
31
|
+
value?: number | string;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default Calendar;
|