Skip to content
Permalink
Browse files

chore: update 'calendar' demo for nativescript-ui-calendar v4.0.0

  • Loading branch information...
ns-bot committed Jun 6, 2019
1 parent 5b1b0ed commit 484b4824fe551618ade896f98935a2516d6719a8
@@ -16,7 +16,7 @@ export class CalendarDayViewComponent implements OnInit {
private _style: CalendarDayViewStyle;
private _weekVisible: boolean;
private _titleVisible: boolean;
@ViewChild("myCalendar") _calendar: RadCalendarComponent;
@ViewChild("myCalendar", { static: true }) _calendar: RadCalendarComponent;

constructor(private _calendarService: CalendarDayEventsService) {

@@ -1,4 +1,4 @@
import { Component, Injectable, OnInit, ViewChild } from "@angular/core";
import { Component, Injectable, ViewChild } from "@angular/core";
import { Page } from "tns-core-modules/ui/page";
import { RadCalendar } from "nativescript-ui-calendar";
import { RadCalendarComponent } from "nativescript-ui-calendar/angular";
@@ -13,7 +13,7 @@ export class CalendarProgrammaticControlComponent {
constructor() {
}

@ViewChild("myCalendar") _calendar: RadCalendarComponent;
@ViewChild("myCalendar", { static: false }) _calendar: RadCalendarComponent;

onNavigateForwardTap() {
this._calendar.nativeElement.navigateForward();
@@ -33,7 +33,7 @@ export class CalendarSelectionModesComponent extends OptionsExampleBase {
return this._selectionMode;
}

@ViewChild("myCalendar") _calendar: RadCalendarComponent;
@ViewChild("myCalendar", { static: false }) _calendar: RadCalendarComponent;

onNoneTap() {
this._selectionMode = CalendarSelectionMode.None;
@@ -21,7 +21,7 @@ export class OptionsComponent implements OnInit, OnDestroy {
this._dataItems = new ObservableArray<string>();
}

@ViewChild("optionsListView") _listView: any;
@ViewChild("optionsListView", { static: true }) _listView: any;

ngOnInit() {
this._sub = this._route.queryParams.subscribe(
@@ -34,6 +34,11 @@ export class OptionsComponent implements OnInit, OnDestroy {
}
}
);
const listView = this._listView.nativeElement;
const index = this._selectedIndex;
setTimeout(function () {
listView.ios.selectRowAtIndexPathAnimatedScrollPosition(NSIndexPath.indexPathForItemInSection(index, 0), false, 0);
}, 0);
}

ngOnDestroy() {
@@ -13,24 +13,27 @@
}
},
"dependencies": {
"@angular/animations": "~7.2.0",
"@angular/common": "~7.2.0",
"@angular/compiler": "~7.2.0",
"@angular/core": "~7.2.0",
"@angular/forms": "~7.2.0",
"@angular/http": "~7.2.0",
"@angular/platform-browser": "~7.2.0",
"@angular/platform-browser-dynamic": "~7.2.0",
"@angular/router": "~7.2.0",
"nativescript-angular": "~7.2.0",
"@angular/animations": "~8.0.0",
"@angular/common": "~8.0.0",
"@angular/compiler": "~8.0.0",
"@angular/core": "~8.0.0",
"@angular/forms": "~8.0.0",
"@angular/http": "8.0.0-beta.10",
"@angular/platform-browser": "~8.0.0",
"@angular/platform-browser-dynamic": "~8.0.0",
"@angular/router": "~8.0.0",
"nativescript-angular": "~8.0.0",
"nativescript-theme-core": "~1.0.4",
"nativescript-ui-calendar": "*",
"reflect-metadata": "~0.1.10",
"rxjs": "^6.3.3",
"tns-core-modules": "^5.0.0",
"typescript": "~3.4.5",
"zone.js": "~0.8.18"
},
"devDependencies": {
"@angular/compiler-cli": "~8.0.0",
"@ngtools/webpack": "~8.0.0",
"@types/chai": "~4.1.3",
"@types/mocha": "~5.2.1",
"@types/node": "^7.0.5",
@@ -47,8 +50,8 @@
"mochawesome": "^3.1.1",
"nativescript-css-loader": "~0.26.0",
"nativescript-dev-appium": "5.2.0",
"nativescript-dev-typescript": "~0.9.0",
"nativescript-dev-webpack": "~0.22.0",
"nativescript-dev-typescript": "~0.10.0",
"nativescript-dev-webpack": "~0.24.0",
"tns-platform-declarations": "^5.4.1",
"tslib": "1.7.1",
"tslint": "~5.11.0"

0 comments on commit 484b482

Please sign in to comment.
You can’t perform that action at this time.