sharepoint 2013列表日期时间选择器选择年份

问题描述 投票:0回答:1

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

sharepoint datepicker sharepoint-2013 sharepoint-list jquerydatetimepicker
1个回答
0
投票

对此没有选项,请改用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>

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.