diff --git a/samples/js-modern-calendar/README.md b/samples/js-modern-calendar/README.md index 865ea9ba6..7fbf0a680 100644 --- a/samples/js-modern-calendar/README.md +++ b/samples/js-modern-calendar/README.md @@ -17,19 +17,21 @@ extensions: This is a modern web part built on the GA version of the [SharePoint Framework](https://dev.office.com/sharepoint/docs/spfx/sharepoint-framework-overview) demonstrating how to build a custom web part with a calendar capabilities in it. -![SS1](https://cloud.githubusercontent.com/assets/13068139/23584809/14c4333e-0121-11e7-9bf1-3117651222d3.png) -![SS2](https://cloud.githubusercontent.com/assets/13068139/23584808/14c3ec26-0121-11e7-8be8-65fbcca32b62.png) -![SS3](https://cloud.githubusercontent.com/assets/13068139/23584807/14b88f34-0121-11e7-8c91-56ecff9343e1.png) +![SS1](./assets/14c4333e-0121-11e7-9bf1-3117651222d3.png) +![SS2](./assets/14c3ec26-0121-11e7-8be8-65fbcca32b62.png) +![SS3](./assets/14b88f34-0121-11e7-8c91-56ecff9343e1.png) + ## Compatibility ![SPFx 1.11](https://img.shields.io/badge/SPFx-1.11.0-green.svg) -![Node.js LTS 10.x](https://img.shields.io/badge/Node.js-LTS%2010.x-green.svg) -![SharePoint Online](https://img.shields.io/badge/SharePoint-Online-yellow.svg) -![Teams N/A: Untested with Microsoft Teams](https://img.shields.io/badge/Teams-N%2FA-lightgrey.svg "Untested with Microsoft Teams") -![Workbench Hosted: Does not work with local workbench](https://img.shields.io/badge/Workbench-Hosted-yellow.svg "Does not work with local workbench") - +![Node.js v10](https://img.shields.io/badge/Node.js-v10-green.svg) +![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-green.svg) +![Does not work with SharePoint 2019](https://img.shields.io/badge/SharePoint%20Server%202019-Incompatible-red.svg "SharePoint Server 2019 requires SPFx 1.4.1 or lower") +![Does not work with SharePoint 2016 (Feature Pack 2)](https://img.shields.io/badge/SharePoint%20Server%202016%20(Feature%20Pack%202)-Incompatible-red.svg "SharePoint Server 2016 Feature Pack 2 requires SPFx 1.1") +![Local Workbench Incompatible](https://img.shields.io/badge/Local%20Workbench-Incompatible-red.svg "The solution requires access to a calendar list hosted in SharePoint") +![Hosted Workbench Compatible](https://img.shields.io/badge/Hosted%20Workbench-Compatible-green.svg) ## Applies to @@ -44,10 +46,10 @@ None Solution|Author(s) --------|--------- -js-modern-calendar | Jeremy Coleman (MCP, PC Professional, Inc.) -js-modern-calendar | Nanddeep Nachan ([@NanddeepNachan](twitter.com/NanddeepNachan)) -js-modern-calendar | Ravi Chandra ([Ravikadri](https://github.com/Ravikadri)) -js-modern-calendar | Peter Paul Kirschner ([@petkir_at](https://twitter.com/petkir_at)) +js-modern-calendar | [Jeremy Coleman](https://github.com/jcoleman-pcprofessional) (MCP, PC Professional, Inc.) +js-modern-calendar | [Nanddeep Nachan](https://github.com/nanddeepn) ([@NanddeepNachan](twitter.com/NanddeepNachan)) +js-modern-calendar | [Ravi Chandra](https://github.com/Ravikadri) +js-modern-calendar | [Peter Paul Kirschner](https://github.com/petkir) ([@petkir_at](https://twitter.com/petkir_at)) ## Version history @@ -58,12 +60,6 @@ Version|Date|Comments 1.0.2.0|February 9, 2021|Upgraded to SPFx 1.11 and fixed issues with missing dependencies 1.0.3.0|October 28, 2021|fixed issues with Timezones. The Browser Timezone Settings are now used -## Disclaimer - -**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.** - ---- - ## Minimal Path to Awesome - Clone this repository @@ -82,4 +78,26 @@ Version|Date|Comments ## Features Renders a calendar from any list available on the selected site. Site, List, Start, End, Event Title,Event Details and Calendar Theme are user-definable in the web part properties, so that you could technically use a custom list as the source for calendar presentation. + +## Disclaimer + +**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.** + +## Help + +We do not support samples, but we this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues. + +If you're having issues building the solution, please run [spfx doctor](https://pnp.github.io/cli-microsoft365/cmd/spfx/spfx-doctor/) from within the solution folder to diagnose incompatibility issues with your environment. + +You can try looking at [issues related to this sample](https://github.com/pnp/sp-dev-fx-webparts/issues?q=label%3Ajs-modern-calendar) to see if anybody else is having the same issues. + +You can also try looking at [discussions related to this sample](https://github.com/pnp/sp-dev-fx-webparts/discussions?discussions_q=label%3Ajs-modern-calendar) and see what the community is saying. + +If you encounter any issues while using this sample, [create a new issue](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=bug-report.yml&sample=js-modern-calendar&authors=@jcoleman-pcprofessional%20@nanddeepn%20@Ravikadri%20@petkir&title=js-modern-calendar%20-%20). + +For questions regarding this sample, [create a new question](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=question.yml&sample=js-modern-calendar&authors=@jcoleman-pcprofessional%20@nanddeepn%20@Ravikadri%20@petkir&title=js-modern-calendar%20-%20). + +Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=suggestion.yml&sample=js-modern-calendar&authors=@jcoleman-pcprofessional%20@nanddeepn%20@Ravikadri%20@petkir&title=js-modern-calendar%20-%20). + + ![](https://telemetry.sharepointpnp.com/sp-dev-fx-webparts/samples/js-modern-calendar) diff --git a/samples/js-modern-calendar/assets/14b88f34-0121-11e7-8c91-56ecff9343e1.png b/samples/js-modern-calendar/assets/14b88f34-0121-11e7-8c91-56ecff9343e1.png new file mode 100644 index 000000000..1a6919624 Binary files /dev/null and b/samples/js-modern-calendar/assets/14b88f34-0121-11e7-8c91-56ecff9343e1.png differ diff --git a/samples/js-modern-calendar/assets/14c3ec26-0121-11e7-8be8-65fbcca32b62.png b/samples/js-modern-calendar/assets/14c3ec26-0121-11e7-8be8-65fbcca32b62.png new file mode 100644 index 000000000..930c6c76f Binary files /dev/null and b/samples/js-modern-calendar/assets/14c3ec26-0121-11e7-8be8-65fbcca32b62.png differ diff --git a/samples/js-modern-calendar/assets/14c4333e-0121-11e7-9bf1-3117651222d3.png b/samples/js-modern-calendar/assets/14c4333e-0121-11e7-9bf1-3117651222d3.png new file mode 100644 index 000000000..0c594273d Binary files /dev/null and b/samples/js-modern-calendar/assets/14c4333e-0121-11e7-9bf1-3117651222d3.png differ diff --git a/samples/js-modern-calendar/assets/sample.json b/samples/js-modern-calendar/assets/sample.json index 05304f268..e86ed49e6 100644 --- a/samples/js-modern-calendar/assets/sample.json +++ b/samples/js-modern-calendar/assets/sample.json @@ -9,7 +9,7 @@ "This is a modern web part built on the GA version of the SharePoint Framework demonstrating how to build a custom web part with a calendar capabilities in it." ], "creationDateTime": "2020-06-05", - "updateDateTime": "2020-06-05", + "updateDateTime": "2021-10-28", "products": [ "SharePoint", "Office" @@ -28,7 +28,18 @@ { "type": "image", "order": 100, - "url": "https://cloud.githubusercontent.com/assets/13068139/23584808/14c3ec26-0121-11e7-8be8-65fbcca32b62.png", + "url": "https://github.com/pnp/sp-dev-fx-webparts/raw/main/samples/assets/14b88f34-0121-11e7-8c91-56ecff9343e1.png", + "alt": "Modern Calendar" + }, + { + "type": "image", + "order": 102, + "url": "https://github.com/pnp/sp-dev-fx-webparts/raw/main/samples/assets/14c3ec26-0121-11e7-8be8-65fbcca32b62.png", + "alt": "Modern Calendar" + },{ + "type": "image", + "order": 103, + "url": "https://github.com/pnp/sp-dev-fx-webparts/raw/main/samples/assets/14c4333e-0121-11e7-9bf1-3117651222d3.png", "alt": "Modern Calendar" } ], diff --git a/samples/js-modern-calendar/src/webparts/modernCalendar/CalendarTemplate.ts b/samples/js-modern-calendar/src/webparts/modernCalendar/CalendarTemplate.ts index 50cb60247..a546de069 100644 --- a/samples/js-modern-calendar/src/webparts/modernCalendar/CalendarTemplate.ts +++ b/samples/js-modern-calendar/src/webparts/modernCalendar/CalendarTemplate.ts @@ -65,7 +65,7 @@ export default class CalendarTemplate { public static theme(): IPropertyPaneDropdownOption[] { var themes: IPropertyPaneDropdownOption[] = []; - CalendarTemplate.themeNames.forEach(function (name, index) { + CalendarTemplate.themeNames.forEach((name, index)=> { themes.push({ key: CalendarTemplate.themeBase + name + "/jquery-ui.min.css", text: name.toLocaleUpperCase(), diff --git a/samples/js-modern-calendar/src/webparts/modernCalendar/ModernCalendarWebPart.ts b/samples/js-modern-calendar/src/webparts/modernCalendar/ModernCalendarWebPart.ts index f57cb59af..1004b17e2 100644 --- a/samples/js-modern-calendar/src/webparts/modernCalendar/ModernCalendarWebPart.ts +++ b/samples/js-modern-calendar/src/webparts/modernCalendar/ModernCalendarWebPart.ts @@ -150,10 +150,10 @@ export default class ModernCalendarWebPart extends BaseClientSideWebPart { var col: IPropertyPaneDropdownOption[] = []; - for (var _key in response3.value) { + for (var _innerKey in response3.value) { col.push({ - key: response3.value[_key]["InternalName"], - text: response3.value[_key]["Title"], + key: response3.value[_innerKey]["InternalName"], + text: response3.value[_innerKey]["Title"], }); } this._columnOptions = col;