Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p-schedule inside p-tabPanel does not render calendar view #497

Closed
aaronj314 opened this issue Jun 19, 2016 · 5 comments
Closed

p-schedule inside p-tabPanel does not render calendar view #497

aaronj314 opened this issue Jun 19, 2016 · 5 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@aaronj314
Copy link

Hi.
I'm setting an issue with p-schedule inside of a p-tabPanel component. The calendar view does not show, but only the calendar toolbar shows. If you do click the 'today' button it will show the calendar.

Here's the specs on the project:

"fullcalendar": "^2.7.2",
"moment-timezone": "^0.5.4",
"primeng": "1.0.0-beta.5",
"primeui": "4.1.10",
"@angular/common": "2.0.0-rc.1",
"@angular/compiler": "2.0.0-rc.1",
"@angular/core": "2.0.0-rc.1",
"@angular/http": "2.0.0-rc.1",
"@angular/platform-browser": "2.0.0-rc.1",
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
"@angular/router": "2.0.0-rc.1",
"@angular/router-deprecated": "2.0.0-rc.1",

Here's a simple test to reproduce the issue:

import {Component, OnInit, AfterViewInit} from '@angular/core';
import {Schedule, Fieldset, TabView, TabPanel} from "primeng/primeng";

@Component({
    selector: 'test',
    template: `
        <div>
        <p-tabView>
         <!--<div class="row">-->
            <!--<div >-->
                <!--<p-schedule [events]="events" [header]="header"  [eventLimit]="4" [editable]="true" defaultDate="2016-06-12"-->
                            <!--(onDayClick)="handleDayClick($event)" (onEventClick)="handleEventClick($event)"></p-schedule>-->
                <!--</div>-->
            <!--</div>-->
    <p-tabPanel header="Profile">
        <p-fieldset legend="Bio">
            Some Bio...
        </p-fieldset>
    </p-tabPanel>
    <p-tabPanel header="Calendar">
        <div class="row">
            <div >
                <p-schedule [events]="events" [header]="header"  [eventLimit]="4" [editable]="true" defaultDate="2016-06-12"
                            (onDayClick)="handleDayClick($event)" (onEventClick)="handleEventClick($event)"></p-schedule>
                </div>
            </div>
    </p-tabPanel>
</p-tabView>
</div>
    `,
    directives: [TabPanel,TabView,Fieldset,Schedule]
})

export class TestComponent implements OnInit {
    events: any[];

    ngOnInit() {
        this.events = [
            {
                "title": "All Day Event",
                "start": "2016-06-01"
            },
            {
                "title": "Long Event",
                "start": "2016-06-07",
                "end": "2016-06-10"
            },
            {
                "title": "Repeating Event",
                "start": "2016-01-09T16:00:00"
            },
            {
                "title": "Repeating Event",
                "start": "2016-01-16T16:00:00"
            },
            {
                "title": "Conference",
                "start": "2016-01-11",
                "end": "2016-01-13"
            }
        ];
    }

    header = {
        left: 'prev,next today',
        center: 'title',
        right: 'month,agendaWeek,agendaDay'
    };

    handleDayClick(){}
    handleEventClick(){}
}

If you uncomment the p-schedule inside the p-TabView the full calendar is rendered.

@NayabHussain
Copy link

@aaronj314 p-schedule is not working... it is showing blank page

@aaronj314
Copy link
Author

Yep that's the issue. Now uncomment the p-schedule right under the p-tableView.

@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Nov 11, 2016
@cagataycivici cagataycivici added this to the 1.0.0 milestone Nov 11, 2016
@cagataycivici cagataycivici self-assigned this Nov 11, 2016
@ajaydev12
Copy link

ajaydev12 commented Dec 2, 2016

@cagataycivici

I'm using v1.0.0 and p-schedule works when it is placed in the first tab. However, it does not work on other tabs. I can force it to render on the second tab by clicking on the today or by clicking on the navigation buttons,

@Ajax-ua
Copy link

Ajax-ua commented Aug 22, 2017

Yes, it is rendered in the first (default) tab and doesn't always rendered in others. Any suggestions?

atretyak1985 pushed a commit to Nanitor/primeng that referenced this issue Jul 18, 2020
[NNTR-505]Change reference to INCIDENTS to ISSUES.
@Tracksport
Copy link

i have the same issue in angular using tabview, if i use fullcalendar in my default tab which is opened it gets rendered without a problem. But if i want to use it in a other tab is does not render correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

6 participants