|
|
@@ -3,11 +3,13 @@
|
|
|
<head>
|
|
|
<link href='../build/out/fullcalendar.css' rel='stylesheet' />
|
|
|
<link href='../build/out/fullcalendar.print.css' rel='stylesheet' media='print' />
|
|
|
+<script src='../lib/moment/moment.js'></script>
|
|
|
<script src='../lib/jquery/jquery.js'></script>
|
|
|
<script src='../lib/jquery-ui/ui/jquery-ui.js'></script>
|
|
|
<script src='../build/out/fullcalendar.js'></script>
|
|
|
<script>
|
|
|
|
|
|
+ // TODO: get rid of this!!! (used at the bottom too)
|
|
|
var date = new Date();
|
|
|
var d = date.getDate();
|
|
|
var m = date.getMonth();
|
|
|
@@ -23,6 +25,7 @@
|
|
|
center: 'title',
|
|
|
right: 'month,agendaWeek,basicWeek,agendaDay,basicDay'
|
|
|
},
|
|
|
+ date: '2014-01-12',
|
|
|
defaultView: 'month',
|
|
|
|
|
|
//firstDay: 1,
|
|
|
@@ -50,12 +53,11 @@
|
|
|
//unselectAuto: false,
|
|
|
//unselectCancel: '.fc',
|
|
|
|
|
|
- select: function(start, end, allDay, ev) {
|
|
|
+ select: function(start, end, ev) {
|
|
|
console.log(
|
|
|
'---- selection ----\n' +
|
|
|
- 'start: ' + start + '\n' +
|
|
|
- 'end: ' + end + '\n' +
|
|
|
- 'allDay: ' + allDay
|
|
|
+ 'start: ' + start.format() + '\n' +
|
|
|
+ 'end: ' + end.format()
|
|
|
);
|
|
|
if (ev) {
|
|
|
//console.log('select mouse: ' + ev.pageX + ', ' + ev.pageY);
|
|
|
@@ -67,56 +69,48 @@
|
|
|
//console.log('unselect mouse: ' + ev.pageX + ', ' + ev.pageY);
|
|
|
}
|
|
|
},
|
|
|
- dayClick: function(date, allDay) {
|
|
|
- console.log('DAYCLICK', date, allDay);
|
|
|
+ dayClick: function(date) {
|
|
|
+ console.log('DAYCLICK', date.format());
|
|
|
console.log(this);
|
|
|
},
|
|
|
editable: true,
|
|
|
events: [
|
|
|
{
|
|
|
title: 'All Day Event',
|
|
|
- start: new Date(y, m, 1)
|
|
|
+ start: '2014-01-01'
|
|
|
},
|
|
|
{
|
|
|
title: 'Long Event',
|
|
|
- start: new Date(y, m, d-5, 5, 0),
|
|
|
- end: new Date(y, m, d-2, 2, 0),
|
|
|
- allDay: false
|
|
|
+ start: '2014-01-07',
|
|
|
+ end: '2014-01-10'
|
|
|
},
|
|
|
{
|
|
|
id: 999,
|
|
|
title: 'Repeating Event',
|
|
|
- start: new Date(y, m, d-3, 16, 0),
|
|
|
- allDay: false
|
|
|
+ start: '2014-01-09T16:00:00'
|
|
|
},
|
|
|
{
|
|
|
id: 999,
|
|
|
title: 'Repeating Event',
|
|
|
- start: new Date(y, m, d+4, 16, 0),
|
|
|
- allDay: false
|
|
|
+ start: '2014-01-16T16:00:00'
|
|
|
},
|
|
|
{
|
|
|
title: 'Meeting',
|
|
|
- start: new Date(y, m, d, 10, 30),
|
|
|
- allDay: false
|
|
|
+ start: '2014-01-12T10:30:00',
|
|
|
+ end: '2014-01-12T12:30:00'
|
|
|
},
|
|
|
{
|
|
|
title: 'Lunch',
|
|
|
- start: new Date(y, m, d, 12, 5),
|
|
|
- end: new Date(y, m, d, 14, 43),
|
|
|
- allDay: false
|
|
|
+ start: '2014-01-12T12:00:00'
|
|
|
},
|
|
|
{
|
|
|
title: 'Birthday Party',
|
|
|
- start: new Date(y, m, d+1, 19, 0),
|
|
|
- end: new Date(y, m, d+1, 22, 30),
|
|
|
- allDay: false
|
|
|
+ start: '2014-01-13T07:00:00'
|
|
|
},
|
|
|
{
|
|
|
title: 'Click for Google',
|
|
|
- start: new Date(y, m, 28),
|
|
|
- end: new Date(y, m, 29),
|
|
|
- url: 'http://google.com/'
|
|
|
+ url: 'http://google.com/',
|
|
|
+ start: '2014-01-28'
|
|
|
}
|
|
|
]
|
|
|
});
|
|
|
@@ -140,12 +134,12 @@
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
|
-<button onclick="calendar.fullCalendar('select', new Date(y, m, d-1), new Date(y, m, d-1), true)">1day, allday</button>
|
|
|
+<button onclick="calendar.fullCalendar('select', new Date(y, m, d-1), new Date(y, m, d-2), true)">1day, allday</button>
|
|
|
<button onclick="calendar.fullCalendar('select', new Date(y, m, d-1))">1day, noend, noallday</button>
|
|
|
<button onclick="calendar.fullCalendar('select', new Date(y, m, d-1), null, false)">1day, noend, allday=false</button>
|
|
|
<button onclick="calendar.fullCalendar('select', new Date(y, m, d, 5, 15), new Date(y, m, d, 15, 30), false)">1day, timed</button>
|
|
|
-<button onclick="calendar.fullCalendar('select', new Date(y, m, d-2), new Date(y, m, d), true)">3day, allday</button>
|
|
|
-<button onclick="calendar.fullCalendar('select', new Date(y, m, d-1, 5, 15), new Date(y, m, d+1, 15, 30), false)">3day, timed</button>
|
|
|
+<button onclick="calendar.fullCalendar('select', new Date(y, m, d-3), new Date(y, m, d), true)">3day, allday</button>
|
|
|
+<button onclick="calendar.fullCalendar('select', new Date(y, m, d-2, 5, 15), new Date(y, m, d+1, 15, 30), false)">3day, timed</button>
|
|
|
<button onclick="calendar.fullCalendar('unselect')">unselect</button>
|
|
|
<div id='calendar'></div>
|
|
|
</body>
|