简体   繁体   English

如何在完整日历js中只显示一个上午和下午时间

[英]How to display only one AM and PM time in Full calendar js

I know that time format issue has been already discussed.我知道已经讨论了时间格式问题。 But stills i can't solve my problem.但仍然无法解决我的问题。 My requirement looks like我的要求看起来像

在此处输入图片说明

Here I want to display all AM interval in a single AM and all PM time in a single PM .在这里,我想显示在一个单一的AM所有AM间隔和在一个单一的PM所有PM时间。

Here is my code这是我的代码

 $(document).ready(function() {
  $("#calendar").fullCalendar({
    header: {
      left: "prev,next today",
      center: "title",
      right: "month,agendaWeek,agendaDay"
    },

    defaultView: "agendaWeek",
    navLinks: true, // can click day/week names to navigate views
    selectable: true,
    selectHelper: true,
    editable: true,
    eventLimit: true, // allow "more" link when too many events
    format: 'DD/MM/YYYY',
  });

}); });

replace format with this two line用这两行替换格式

  timeFormat: "H:mm",
  slotLabelFormat: "HH:mm",

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Moment JS中使用带有日历功能的AM / PM格式 - How to use AM/PM format with the calendar function in moment js Vue JS time-slots-generator 如何从 object 获取值然后显示 PM / AM - Vue JS time-slots-generator how to get value from object then display PM / AM 在 JavaScript 中显示时间为 AM、PM - Display time as AM, PM in JavaScript 如何在反应 js 或 javascript 中仅显示上午 9 点到下午 5 点之间的时间? - How to show button only the time between 9am to 5pm in react js or javascript? 如何在bootstrap-material-datetimepicker.js中将时间选择器设置为仅从上午8:30到下午5:30设置时间? - How to set time picker only set time from 8:30 am to 5:30 pm in bootstrap-material-datetimepicker.js? 如何在 AM / PM 中设置时间 - How to set time in AM / PM 如何使用完整日历和 Vue js 在我的日历中显示数据? - How can I display data in my Calendar using Full Calendar and Vue js? 如何使用Java中的AM / PM为时间创建正则表达式 - How to create regex for time with AM/PM in Javascript 如何将日期/时间显示从 24 小时转换为 12 小时 AM/PM - How to Convert Date/Time Display from 24hr to 12hr AM/PM 如何使用HTML5时间输入元素显示“am”或“pm”指示符? - How can I get an “am” or “pm” indicator to display with the HTML5 time input element?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM