You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何让嵌入的共享Outlook HTML日历默认显示日视图?

设置Outlook共享日历默认日视图(嵌入iframe场景)

嘿,这个问题我刚好解决过!要让嵌入的Outlook共享日历默认显示日视图,只需要给iframe的src链接添加一个官方支持的URL参数就行,具体操作如下:

核心原理

Outlook的共享日历HTML链接支持通过URL参数指定默认视图,我们需要添加的参数是&viewTime=daily:

  • 如果原链接末尾没有其他参数,用?viewTime=daily开头;如果已经有参数(比如链接里带?的情况),就用&viewTime=daily衔接

修改后的完整代码

把你原来的iframe地址修改一下,下面是调整后的完整HTML代码:

<!DOCTYPE html> 
<html lang="en"> 
<head> 
    <meta charset="utf-8"> 
    <meta name="description" content=""> 
    <meta name="keywords" content=""> 
    <title>Shared Calendar</title> 
    <style type="text/css"> 
        body { 
            color:#000000; 
            background-color:#FFFFFF; 
            background-image:url('Background Image'); 
            background-repeat:no-repeat; 
        } 
        a { color:#0000FF; } 
        a:visited { color:#800080; } 
        a:hover { color:#008000; } 
        a:active { color:#FF0000; } 
    </style> 
    <!--[if IE]> 
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> 
    <![endif]--> 
</head> 
<body itemscope itemtype="http://schema.org/Organization"> 
    <iframe style="width: 768px; height: 1366px; overflow: hidden;" 
            src="https://outlook.office365.com/owa/calendar/somethinghere/anotherhere/calendar.html&viewTime=daily" 
            width="800" 
            height="1200" 
            scrolling="no">
        Iframes not supported
    </iframe> 
</body> 
</html>

额外小提示

  • 除了daily(日视图),你还可以用weekly(周视图)、monthly(月视图)来切换其他默认视图,按需调整就行
  • 这个参数是Outlook官方支持的,不用担心后续会失效,刚好适配你在树莓派小LCD上展示当日空闲状态的需求!

内容的提问来源于stack exchange,提问作者rellik

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.06 11:32:48