Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 移动版中的完整日历设置高度_Css_Angular_Fullcalendar - Fatal编程技术网

Css 移动版中的完整日历设置高度

Css 移动版中的完整日历设置高度,css,angular,fullcalendar,Css,Angular,Fullcalendar,我在一个角度项目中使用fullcalendar。我的问题是:当我使用手机时,如何更改日历的高度? 我尝试了contentHeight,但不起作用(我想在更改分辨率时更改高度)。 这是可变日历选项: public calendarOptions: any = { eventLimit: true, contentHeight: () => { if (screen.height < 577) { $('#calendar').fu

我在一个角度项目中使用fullcalendar。我的问题是:当我使用手机时,如何更改日历的高度? 我尝试了contentHeight,但不起作用(我想在更改分辨率时更改高度)。 这是可变日历选项:

public calendarOptions: any = {
    eventLimit: true,
    contentHeight: () => {
        if (screen.height < 577) {
            $('#calendar').fullCalendar({
                contentHeight: 600
            });
        } else {
            $('#calendar').fullCalendar({
                contentHeight: 'auto'
            });
        }
    },
    timeFormat: 'HH:mm',
    monthNames: [
        'Gennaio',
        'Febbraio',
        'Marzo',
        'Aprile',
        'Maggio',
        'Giugno',
        'Luglio',
        'Agosto',
        'Settembre',
        'Ottobre',
        'Novembre',
        'Dicembre',
    ],
    showNonCurrentDates: false,
    monthNamesShort: [
        'Gen',
        'Feb',
        'Mar',
        'Apr',
        'Mag',
        'Giu',
        'Lug',
        'Ago',
        'Set',
        'Ott',
        'Nov',
        'Dic',
    ],
    header: {
        left: 'prev,next,today',
        center: 'title',
        right: 'month,agendaWeek,listDay',
    },
    buttonText: {
        today: 'Oggi',
        month: 'Mese',
        week: 'Settimana',
        day: 'Giorno',
    },
    events: [],
    selectable: true,
    eventRender: (event, element) => {
        element.html(
            '<div style="padding: 3px; height: 100%;" *ngFor="let event of events"' +
            ' class="c-label-appointment event-state-' + event.attributes.status + ' event-esit-' + event.attributes.esit + '">' +
            '<span class="fc-time">' +
            moment(event.start).format('HH:mm') + '</span>' +
            ' <span class="fc-nomeCliente"><strong>' + event.attributes.customer.name +
            ' ' + event.attributes.customer.surname + '</strong></span>' +
            '</div>',
        );
    },
};
公共日历选项:任意={
eventLimit:对,
内容高度:()=>{
如果(屏幕高度<577){
$(“#日历”).fullCalendar({
内容高度:600
});
}否则{
$(“#日历”).fullCalendar({
contentHeight:“自动”
});
}
},
时间格式:“HH:mm”,
月刊:[
“Gennaio”,
“Febbraio”,
“Marzo”,
“Aprile”,
“Maggio”,
“Giugno”,
“卢格里奥”,
“Agosto”,
“settember”,
“Ottobre”,
“Novenbre”,
“Dicembre”,
],
显示非当前日期:false,
蒙特纳梅肖特:[
“根”,
二月,,
“三月”,
“四月”,
“杂志”,
"Giu",,
"吊耳",,
“以前”,
“集”,
“Ott”,
十一月,,
“Dic”,
],
标题:{
左:“上一个,下一个,今天”,
中心:'标题',
右图:“月,agendaWeek,listDay”,
},
按钮文字:{
今天:“Oggi”,
月份:'Mese',
周:“塞蒂马纳”,
day:‘Giorno’,
},
事件:[],
是的,
eventRender:(事件,元素)=>{
element.html(
'' +
'' +
力矩(event.start).format('HH:mm')+“”+
“”+event.attributes.customer.name+
''+event.attributes.customer.nam姓氏+''+
'',
);
},
};
下面的代码是Html文件:

        <div class="col col-md-12 calendar-container">
        <div class="panel">
            <div class="panel-body with-padding container-calendar">
                <div class="opacity-black-calendar" *ngIf="isWorking"></div>
                <angular2-fullcalendar id="calendar" [options]=""></angular2-fullcalendar>
            </div>
        </div>
    </div>


我正在使用引导断点(最大宽度<576时的移动版本)。

我只是在calendarOption中添加了以下选项:

 contentHeight: ()=>{
      console.log(screen.width);
      if(screen.width < 577) {
            return 600
        } else {
            return 1000
        }
      },
contentHeight:()=>{
控制台.日志(屏幕.宽度);
如果(屏幕宽度<577){
返回600
}否则{
返回1000
}
},

我只是在calendarOption中添加了以下选项:

 contentHeight: ()=>{
      console.log(screen.width);
      if(screen.width < 577) {
            return 600
        } else {
            return 1000
        }
      },
contentHeight:()=>{
控制台.日志(屏幕.宽度);
如果(屏幕宽度<577){
返回600
}否则{
返回1000
}
},
我想控制通过CSS,这是工作


我想通过CSS进行控制,这是可行的。

我解决了,这真的很简单如果你解决了错误,你可以添加你的修复作为答案。它在问题下我建议你添加它作为你自己问题的答案,让其他人更容易看到问题已经解决。我在问题下添加了解决方案,但我不知道如何强调它。我解决了,它真的很简单如果你解决了错误,你可以添加你的修复作为答案。它在问题下我建议你添加它作为你自己问题的答案,让其他人更容易看到问题已解决。我在问题下添加了解决方案,但我不知道如何突出它。效果很好!我所要做的就是根据我的喜好调整这些值。效果很好!我所要做的就是根据我的喜好调整这些值。