daypilot日历:如何显示从星期日到星期六没有日期的日子的名称



如何显示DayPilotCalendar中没有日期的星期日到星期六的日期名称?

我想在屏幕上显示:

Sun , Mon .... Sat 

谢谢

你需要的是将HeaderDateFormat设置为"dddd",这将只会显示一周中的几天。

有关如何使用日期格式的更多示例,请参阅以下页面https://www.daypilot.org/choosing_headerdateformat_datetime_tostring_parameters/

您可以直接添加标题格式到DayPilot:DayPilotCalendar

DayPilot:DayPilotCalendar ID="DayPilotCalendar1" runat="server"headerDateFormat = "dddd"

可以使用headerDateFormat属性在列标题中指定日期格式。接受DayPilot.Date.toString(pattern)格式字符串

如果没有指定headerDateFormat,则使用当前localedatePattern值。

例子
<div id="dp"></div>
<script>
  var dp = new DayPilot.Calendar("dp");
  // ...
  dp.headerDateFormat = "dddd"; // day of week, long format (e.g. "Monday")
  dp.init();
</script>

了解更多信息https://doc.daypilot.org/calendar/header-date-format/

最新更新