Skip to content

Instantly share code, notes, and snippets.

class MyApp extends Component {
fullCalendar = React.createRef()
render() {
return (
<div>
<button onClick={ this.handleNext }>goto next</button>
<FullCalendar ref={ this.fullCalendar } />
what about a gist that i dont' stoar?
will i be notified of comemnts?
@arshaw
arshaw / BEM-addon.html
Last active August 29, 2015 14:18
Generated by SassMeister.com.
<div class="app-card">
<div class="app-card--title"></div>
<div class="app-card--content"></div>
</div>
<!-- a variation -->
<div class="app-card -tall">
<div class="app-card--title"></div>
<div class="app-card--content"></div>
</div>
@arshaw
arshaw / BEM-singleclass.html
Last active August 29, 2015 14:18
Generated by SassMeister.com.
<div class="app-card">
<div class="app-card__title"></div>
<div class="app-card__content"></div>
</div>
<!-- a variation -->
<div class="app-card--tall">
<div class="app-card__title"></div>
<div class="app-card__content"></div>
</div>
@arshaw
arshaw / BEM-multiclass.html
Last active August 29, 2015 14:18
Generated by SassMeister.com.
<div class="app-card">
<div class="app-card__title"></div>
<div class="app-card__content"></div>
</div>
<!-- a variation -->
<div class="app-card app-card--tall">
<div class="app-card__title"></div>
<div class="app-card__content"></div>
</div>
@arshaw
arshaw / fiddle.response.json
Created June 5, 2014 01:56
many events json, for v2
[{"id":830,"start":1262279460000,"end":1262281260,"title":"this is a long event isnt that righttt","body":"","multi":0,"allDay":false,"extension_id":2},{"id":831,"start":1262282052000,"end":1262283852,"title":"830","body":"","multi":0,"allDay":false,"extension_id":2},{"id":832,"start":1262284644000,"end":1262286444,"title":"831","body":"","multi":0,"allDay":false,"extension_id":2},{"id":833,"start":1262287236000,"end":1262289036,"title":"832","body":"","multi":0,"allDay":false,"extension_id":2},{"id":834,"start":1262289828000,"end":1262291628,"title":"833","body":"","multi":0,"allDay":false,"extension_id":2},{"id":835,"start":1262292420000,"end":1262294220,"title":"834","body":"","multi":0,"allDay":false,"extension_id":2},{"id":836,"start":1262295012000,"end":1262296812,"title":"835","body":"","multi":0,"allDay":false,"extension_id":2},{"id":837,"start":1262297604000,"end":1262299404,"title":"836","body":"","multi":0,"allDay":false,"extension_id":2},{"id":838,"start":1262300196000,"end":1262301996,"title":"83

Proposal for a date system overhaul

The Problem

FullCalendar was initially designed without much notion of timezones. By default, it ignores timezone offsets in the dates it receives.

The original assumption was that if you received a date from Brussels, say "2013-09-01T12:00:00+02:00", which is noon, it would display as noon in every timezone.

However, FullCalendar shoehorns this value into a local date. With the same example, if you were in San Francisco, it internally stores the date as "2013-09-01T12:00:00-08:00". This is bad for two reasons:

@arshaw
arshaw / sample_french.js
Last active October 21, 2019 05:04
Sample language config for FullCalendar in the French language
// The goal of this language config is to give FullCalendar everything it needs for
// translations (in this case, French). This happens to be a merge of Moment's and
// the jQuery UI datepicker's configs, in addition to some other strings.
//
// Additionally, when this config is loaded, Moment and the jQuery UI datepicker
// (if it is on the page) will also be initialized.
//
(function(){
function onload (moment, $) {
@arshaw
arshaw / fiddle.response.json
Created August 13, 2013 06:42
many agenda events json
[{"title": "event", "start": "2009-12-13"}, {"title": "event", "start": "2009-12-13"}, {"title": "event", "start": "2009-12-13"}, {"title": "event", "start": "2009-12-13"}, {"title": "event", "start": "2009-12-13"}, {"title": "event", "start": "2009-12-13"}, {"title": "event", "start": "2009-12-13"}, {"title": "event", "start": "2009-12-13"}, {"title": "event", "start": "2009-12-13"}, {"title": "event", "start": "2009-12-13"}, {"title": "event", "start": "2009-12-13"}, {"title": "event", "start": "2009-12-13"}, {"title": "event", "start": "2009-12-13"}, {"title": "event", "start": "2009-12-13 00:00:00", "allDay": false}, {"title": "event", "start": "2009-12-13 01:00:00", "allDay": false}, {"title": "event", "start": "2009-12-13 02:00:00", "allDay": false}, {"title": "event", "start": "2009-12-13 03:00:00", "allDay": false}, {"title": "event", "start": "2009-12-13 04:00:00", "allDay": false}, {"title": "event", "start": "2009-12-13 05:00:00", "allDay": false}, {"title": "event", "start": "2009-12-13 06:00:00",