|
2 | 2 | Please read this **before** usage! |
3 | 3 | This material calendar is just beginning. As in the angular material components, a beautiful calendar is to be generated by simple integration. Cooperation is welcome. |
4 | 4 |
|
5 | | -> Warning: during the migration to github parts of the project were mixed up !! |
6 | | -All features can be lost after an update from 2.1.2 to> 2.1.2. |
7 | | -This will be solved in version 3.0.0, which will come as soon as I can. |
8 | | -From version 3.0.0 onwards there will be a stable API with extensive features and its own documentation |
| 5 | +> Warning: all version before 3.0.0 are deprecated, please update to any version higher than 3.0.0! |
9 | 6 |
|
10 | 7 | ### Working demo |
11 | 8 | [demo github project](https://github.com/eksrvb/material-calendar-demo) |
12 | 9 |
|
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | -## Installing |
18 | | -`npm i material-calendar` |
19 | | - |
20 | | -## Usage |
21 | | -app.module.ts |
22 | | -``` typescript |
23 | | -import { BrowserModule } from '@angular/platform-browser'; |
24 | | -import { NgModule, LOCALE_ID } from '@angular/core'; |
25 | | - |
26 | | -import { AppComponent } from './app.component'; |
27 | | -import { MaterialCalendarModule } from 'material-calendar'; |
28 | | - |
29 | | -@NgModule({ |
30 | | - declarations: [ |
31 | | - AppComponent |
32 | | - ], |
33 | | - imports: [ |
34 | | - BrowserModule, |
35 | | - MaterialCalendarModule |
36 | | - ], |
37 | | - providers: [ |
38 | | - {provide: LOCALE_ID, useValue: 'de-DE' } |
39 | | - ], |
40 | | - bootstrap: [AppComponent] |
41 | | -}) |
42 | | -export class AppModule { } |
43 | | -``` |
44 | | -import the `MaterialCalendarModule` and optional provide your location. |
45 | | -In my case: `{provide: LOCALE_ID, useValue: 'de-DE' }` |
46 | | - |
47 | | -In your html: |
48 | | -``` html |
49 | | -<calendar-panels></calendar-panels> |
50 | | -``` |
51 | | -and you are good to go ;) |
52 | | - |
53 | | -All options are shown here: |
54 | | - |
55 | | -``` html |
56 | | -<calendar-panels |
57 | | - [mode]="mode" |
58 | | - [placeholderDay]="placeholder" |
59 | | - year="2020" |
60 | | - month="3" |
61 | | - monthsBefore="1" |
62 | | - monthsAfter="1" |
63 | | - [config]="calendarConfig" |
64 | | - (clickDate)="yourMethod($event)"> |
65 | | -</calendar-panels> |
66 | | -<!-- |
67 | | - default mode = monthly |
68 | | - default placeholderDay = false |
69 | | - default year = current year |
70 | | - default month = current month |
71 | | - default monthsBefore = 1 |
72 | | - default monthsAfter = 1 |
73 | | ---> |
74 | | -``` |
75 | | -``` typescript |
76 | | -import { CalendarConfig } from 'material-calendar'; |
77 | | - |
78 | | -placeholder = false // boolean ...can be hardcoded in html |
79 | | -mode = 'monthly' // 'annual' | 'monthly' ...can be hardcoded in html |
80 | | - |
81 | | -calendarConfig: CalendarConfig = { |
82 | | - panelBgColor: '#00677f', // use only hex or rbg colors |
83 | | - autoTextColor: true, |
84 | | - textColor: '#fff', // use only hex or rbg colors |
85 | | - displayYear: true, |
86 | | - firstDayOfWeekMonday: true, |
87 | | - todayColor: '#fff', |
88 | | - panelWidth: '100%', // can also be fix values such as 350px |
89 | | - calendarWeek: true, |
90 | | - switches: false, |
91 | | -} |
92 | | -``` |
93 | | -``` javascript |
94 | | -/** |
95 | | -* @param {boolean} autoTextColor Sets the text color automatically, based on the backgroud colors |
96 | | -* @param {boolean} calendarWeek display the calendar week |
97 | | -* @param {boolean} displayYear displays the year next to the Month name |
98 | | -* @param {boolean} switches display switches in calendar component or not |
99 | | -* @param {string} panelBgColor sets the background color of the panel |
100 | | -* @param {string} textColor if autoTextColor false this must be set to a custom color |
101 | | -* |
102 | | -*/ |
103 | | -``` |
104 | | - |
105 | | -## Planned features |
| 10 | +If you want to give me feedback and don't want to open an issue on github, please fill out the [form](https://forms.gle/W9TygXf65Yru3VHi7) |
106 | 11 |
|
107 | | -- insert your own calendar data and render the new template |
108 | | -- multiselect days optional (returns the daily span) |
| 12 | +### Documentation |
| 13 | + |
| 14 | +[See the manual](https://eksrvb.github.io/material-calendar/) for setup, usage instructions and a lot more. (the documentation is still rising) |
109 | 15 |
|
110 | | -and many more... |
111 | 16 |
|
112 | 17 | ## Features |
113 | 18 |
|
114 | 19 | - generate a nice calendar in material design |
115 | 20 | - get a date back with the annotation "clickDate" (see example) |
| 21 | +- insert your own calendar data and render the new template |
| 22 | +- multiselect days optional (returns the daily span) |
| 23 | +more in the docs... ;) |
| 24 | + |
| 25 | +## Getting help |
| 26 | + |
| 27 | +If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker. |
116 | 28 |
|
117 | 29 | ## Code scaffolding |
118 | 30 |
|
119 | 31 | For code scaffolding, the project can be checked out from the public repository and pull requests can be made. |
120 | | - |
121 | 32 |
|
122 | 33 | ## Build |
123 | 34 |
|
|
0 commit comments