2016-10-16 3 views
0

現在、完全な日付を表示するのではなく、イベントの日のみを表示するようにカレンダーに要求するPSDデザインを変換しています。例えば:12の代わりに、2016年10月12日fullcalendar js 'の日付をlistMonthビューに表示

は、ここで私がこれまで持っているものです。

enter image description here

あなたが左に見ることができるように、それは「私が唯一のディスプレイにそれをしたい10月12日、2016年を表示します12 "となる。私はドキュメントを見てみましたが、listMonthビューに固有のオプションは見つかりません。カレンダーのレンダリングのコードは次のとおりです。

<script> 

    $(document).ready(function() { 

     $('#calendar').fullCalendar({ 

      header: { 
       left: 'prev,next today', 
       center: 'title', 
       right: 'month,listYear', 
      }, 

      views: { 
       listMonth: { 
        titleFormat: 'MMMM' 
       } 
      }, 

      defaultView: 'listMonth', 

      displayEventTime: false, // don't show the time column in list view 

      // THIS KEY WON'T WORK IN PRODUCTION!!! 
      // To make your own Google API key, follow the directions here: 
      // http://fullcalendar.io/docs/google_calendar/ 
      //googleCalendarApiKey: 'AIzaSyDcnW6WejpTOCffshGDDb4neIrXVUA1EAE', 

      // US Holidays 
      //events: 'en.usa#[email protected]', 
        events: [ 
    <?php if($events->have_posts()) : 
     while ($events->have_posts()) : $events->the_post(); 
      $event_dates = get_post_meta(get_the_id(), 'date', true); 
      $event_info = get_post_meta(get_the_id(), 'info', true); 
      //foreach($event_dates as $event_date): 
    ?> 
     { 

        title: '<?php the_title(); ?>', 
        start: '<?php echo date('Y-m-d', strtotime($event_dates["start_date_time"])); ?>', 
        description: '<?php echo date('ga', strtotime($event_dates["start_date_time"])).', '.$event_info["venue"].', '.$event_info["place"]; ?>' 
     }, 
    <?php endwhile; ?> 
    <?php endif; ?> 
     // more events here 
    ], 
    eventRender: function(event, element, view) { 
     return $('<tr><td>' + event.description + '</td></tr>'); 
    }, 


      eventClick: function(event) { 
       // opens events in a popup window 
       window.open(event.url, 'gcalevent', 'width=700,height=600'); 
       return false; 
      }, 

      loading: function(bool) { 
       $('#loading').toggle(bool); 
      } 

     }); 

    }); 
</script> 

誰かが私を助けてくれることを願っています。それが私の必要なすべてです。そして、私は終わりました。ありがとう!カレンダーが表示される

$(".fc-list-heading-alt").html($(".fc-list-heading-alt").text().split(" ")[1].split(",")[0]); 

後:

答えて

0

はこれを使用しています。希望、これはあなたを助ける

また、これを次の前にボタンで追加します。

+0

これを試してみました。私もjqueryを使ってテキストを修正しようとしましたが、カレンダーにはまったく影響しません。レンダリング後の変更は機能していないようです。しかし、ありがとう男 –

+0

fullcalendarコードの後に​​書いてください。つまり、カレンダーが画面にレンダリングされたときに呼び出してください。 –

+0

これを試しましたか?私は、カレンダーには影響しませんでした。 –

関連する問題