【问题标题】:sharepoint 2013 list datetime picker select yearsharepoint 2013 列表日期时间选择器选择年份
【发布时间】:2020-07-28 01:07:19
【问题描述】:

我想在共享点列表 datepicker 列中添加年份选项,因为它不允许选择年份,除了交换 12 个月前有人可以建议吗?

【问题讨论】:

    标签: sharepoint datepicker sharepoint-2013 sharepoint-list jquerydatetimepicker


    【解决方案1】:

    没有这个选项,请改用jQuery Datapicker

    $( "#datepicker" ).datepicker({
          changeMonth: true,
          changeYear: true
        })
    

    更新:

    将脚本插入您的列表表单(新论坛/编辑表单),将“时间”更新为您的字段标题。

    <script src="http://code.jquery.com/jquery-1.8.3.js"></script>
        <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
        <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
        <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
    
        <script type="text/javascript">
            $(document).ready(function () {
                $('input[title="Time"]').datepicker({
                    changeMonth: true,
                    changeYear: true
                })
                $('input[title="Time"]').parent().siblings().hide();
            });
        </script>
    

    【讨论】:

    • 如何添加到我的 datepicker 列
    猜你喜欢
    • 1970-01-01
    • 2011-05-04
    • 2015-06-07
    • 1970-01-01
    • 2012-01-08
    • 2018-12-08
    • 2020-02-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多