【问题标题】:jQuery datepicker to handle Fiscal CalendarjQuery datepicker 处理财政日历
【发布时间】:2017-11-12 07:45:29
【问题描述】:

是否可以创建 jQuery Datepicker 来处理财政日历?

搜遍了整个互联网,找不到任何方法。

我需要设置自定义开始和结束日期。

谢谢

编辑

我想要的是定义我自己的custom Month。例如:我可以使用Period 1 而不是October 2016,它的日期应该是Oct 1 - Oct 31,它应该是Sep 25 - Oct 29。然后Period 2 - 来自Oct 30 - Nov 26

对此没有特定的模式,但我确实有一个我想要构建的每个 Period 的日期列表。

【问题讨论】:

  • 你找到答案了吗?

标签: jquery datepicker jquery-ui-datepicker


【解决方案1】:

如果我没记错的话,这是你要找的吗

$(document).ready(function() {
  // Datepicker
  $('#datepicker').datepicker({
    inline: true,
    hideIfNoPrevNext: true,
    hideIfNoPrevNext: true,
    numberOfMonths: [4, 2],
    defaultDate: '01 / 01 / ' + new Date().getFullYear(),
  });
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.css" rel="stylesheet" />
<link href="https://code.jquery.com/ui/1.11.4/themes/black-tie/jquery-ui.css" rel="stylesheet" />
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>



<input name="my-date" id="datepicker">

【讨论】:

  • 感谢您的回复!请看一下新的编辑。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-06-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多