0

я хочу, чтобы выделить текущую дату каландраBootstrap Календарь выделить текущую дату

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> 
    <link href="css/bootstrap_calendar.css" rel="stylesheet"> 
    <script src="js/bootstrap_calendar.min.js"></script> 
    <script type="text/javascript"> 
      $(document).ready(function(){ 
       theMonths = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; 
       theDays = ["S", "M", "T", "W", "T", "F", "S"]; 

       $('.calendar_test').calendar({ 
        months: theMonths, 
        days: theDays, 
        req_ajax: { 
         type: 'get', 
         url: 'json.php' 
        } 
       }); 
      }); 
     </script> 

мой HTML код

<div class="calendar_test"></div> 

ссылка: http://lab.xero.nu/bootstrap_calendar/

ответ

0

Ваш json.php должен вернуть что-то подобное :

<?php 

$array = array(
    array(
    "DATE_OF_TODAY", // you must format the date of the day correctly for the calendar. 
    'Today', 
    '#', 
    'blue' //the color that the day must have (accepts also hexa value) 
) 
); 

header('Content-Type: application/json'); 
echo json_encode($array); 
exit; 
?> 
Смежные вопросы