Dhananjay Malipatil
asked on
Need to Show next dates only and calender must start with today date.
I need to start the calender with date & it must shows next 30 dates only.
can anyone please help me out from this.
can anyone please help me out from this.
What calendar?
ASKER
I have used fullcalendar
I am not familiar with fullcalendar. Without source code or a link to a site that demonstrates the problem I am unable to assist.
ASKER
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='../fullcalendar.min. css' rel='stylesheet' />
<script src='../lib/moment.min.js' ></script>
<script src='../lib/jquery.min.js' ></script>
<script src='../fullcalendar.min.j s'></scrip t>
<script>
var cal=$('#calendar').fullCal endar({
theme: false,
firstDay: 0,
isRTL: false,
fixedWeekCount: false,
weekNumbers:false,
height: 'auto',
contentHeight:'auto',
aspectRatio:'1.35',
header: {
left: 'today',
center: 'title',
right: 'month'
},
eventSources: [
{
url: 'myfeed.php', // use the `url` property
color: 'yellow', // an option!
textColor: 'black' // an option!
}
]
});
</script>
<style>
body {
margin: 0;
padding: 0;
font-family: "Lucida Grande",Helvetica,Arial,Ve rdana,sans -serif;
font-size: 14px;
}
#script-warning {
display: none;
background: #eee;
border-bottom: 1px solid #ddd;
padding: 0 10px;
line-height: 40px;
text-align: center;
font-weight: bold;
font-size: 12px;
color: red;
}
#loading {
display: none;
position: absolute;
top: 10px;
right: 10px;
}
#calendar {
max-width: 900px;
margin: 40px auto;
padding: 0 10px;
}
</style>
</head>
<body>
<div id='script-warning'>
<code>php/get-events.php</ code> must be running.
</div>
<div id='loading'>loading...</d iv>
<div id='calendar'></div>
</body>
</html>
myfeed.php
<?php
header("content-type: application/json");
$post_data = array();
//add first event
$post_data[] = array('title' => 'Test', 'start' => '2018-03-09');
$post_data[] = array('title' => 'Test', 'start' => '2018-03-20');
$post_data[] = array('title' => 'Test', 'start' => '2018-03-09');
$post_data[] = array('title' => 'Test', 'start' => '2018-03-09');
//add second event
// $post_data[] = ...
echo json_encode($post_data);
?>
<html>
<head>
<meta charset='utf-8' />
<link href='../fullcalendar.min.
<script src='../lib/moment.min.js'
<script src='../lib/jquery.min.js'
<script src='../fullcalendar.min.j
<script>
var cal=$('#calendar').fullCal
theme: false,
firstDay: 0,
isRTL: false,
fixedWeekCount: false,
weekNumbers:false,
height: 'auto',
contentHeight:'auto',
aspectRatio:'1.35',
header: {
left: 'today',
center: 'title',
right: 'month'
},
eventSources: [
{
url: 'myfeed.php', // use the `url` property
color: 'yellow', // an option!
textColor: 'black' // an option!
}
]
});
</script>
<style>
body {
margin: 0;
padding: 0;
font-family: "Lucida Grande",Helvetica,Arial,Ve
font-size: 14px;
}
#script-warning {
display: none;
background: #eee;
border-bottom: 1px solid #ddd;
padding: 0 10px;
line-height: 40px;
text-align: center;
font-weight: bold;
font-size: 12px;
color: red;
}
#loading {
display: none;
position: absolute;
top: 10px;
right: 10px;
}
#calendar {
max-width: 900px;
margin: 40px auto;
padding: 0 10px;
}
</style>
</head>
<body>
<div id='script-warning'>
<code>php/get-events.php</
</div>
<div id='loading'>loading...</d
<div id='calendar'></div>
</body>
</html>
myfeed.php
<?php
header("content-type: application/json");
$post_data = array();
//add first event
$post_data[] = array('title' => 'Test', 'start' => '2018-03-09');
$post_data[] = array('title' => 'Test', 'start' => '2018-03-20');
$post_data[] = array('title' => 'Test', 'start' => '2018-03-09');
$post_data[] = array('title' => 'Test', 'start' => '2018-03-09');
//add second event
// $post_data[] = ...
echo json_encode($post_data);
?>
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There is no activity on this question from author 14 days.