From b313d0eb6b3690751f7a4e5820319d1d49c2932f Mon Sep 17 00:00:00 2001 From: Marcelo Camargo Date: Mon, 6 Jul 2015 02:24:21 -0300 Subject: [PATCH] FullCalendar also accepts strings as dates --- fullCalendar/fullCalendar.d.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/fullCalendar/fullCalendar.d.ts b/fullCalendar/fullCalendar.d.ts index feb537e67b..f73dc2d8bf 100644 --- a/fullCalendar/fullCalendar.d.ts +++ b/fullCalendar/fullCalendar.d.ts @@ -1,6 +1,6 @@ // Type definitions for FullCalendar 1.6.1 // Project: http://arshaw.com/fullcalendar/ -// Definitions by: Neil Stalker +// Definitions by: Neil Stalker , Marcelo Camargo // Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -99,7 +99,7 @@ declare module FullCalendar { selectHelper?: any; // Boolean/Function unselectAuto?: boolean; unselectCancel?: string; - select?: (startDate: Date, endDate: Date, allDay: boolean, jsEvent: MouseEvent, view: View) => void; + select?: (startDate: Date | string, endDate: Date | string, allDay: boolean, jsEvent: MouseEvent, view: View) => void; unselect?: (view: View, jsEvent: Event) => void; // Event Data - http://arshaw.com/fullcalendar/docs/event_data/ @@ -109,7 +109,7 @@ declare module FullCalendar { * * - EventObject[] * - string (JSON feed) - * - (start: Date, end: Date, callback: {(events: EventObject[]) => void;}) => void; + * - (start: Date | string, end: Date | string, callback: {(events: EventObject[]) => void;}) => void; */ events?: any; @@ -119,7 +119,7 @@ declare module FullCalendar { * - EventSource * - EventObject[] * - string (JSON feed) - * - (start: Date, end: Date, callback: {(events: EventObject[]) => void;}) => void; + * - (start: Date | string, end: Date | string, callback: {(events: EventObject[]) => void;}) => void; */ eventSources?: any[]; @@ -164,8 +164,8 @@ declare module FullCalendar { export interface View { name: string; title: string; - start: Date; - end: Date; + start: Date | string; + end: Date | string; visStart: Date; visEnd: Date; } @@ -214,8 +214,8 @@ declare module FullCalendar { id?: any // String/number title: string; allDay?: boolean; - start: Date; - end?: Date; + start: Date | string; + end?: Date | string; url?: string; className?: any; // string/Array editable?: boolean; @@ -233,7 +233,7 @@ declare module FullCalendar { * * - EventObject[] * - string (JSON feed) - * - (start: Date, end: Date, callback: {(events: EventObject[]) => void;}) => void; + * - (start: Date | string, end: Date | string, callback: {(events: EventObject[]) => void;}) => void; */ events?: any; @@ -312,7 +312,7 @@ interface JQuery { /** * Moves the calendar to an arbitrary date. */ - fullCalendar(method: 'gotoDate', date: Date): void; + fullCalendar(method: 'gotoDate', date: Date | string): void; /** * Moves the calendar forward/backward an arbitrary amount of time.