Reputation: 2449
I am trying to create an appointment-scheduling application with fullcalendar
. I want to represent time-slots on the calendar in only one timezone(i.e., EST) across all locations. So even if a person from PST zone is viewing the calendar, the times should be in EST. Also, even he/she schedules clicks a slot, the time should be in EST. How can I set a default time-zone for the calendar irrespective of location.
Upvotes: 1
Views: 353
Reputation: 340
I believe this can be done by specifying the timezone string when you initialize your calendar:
$('#calendar-selector-id-name').fullCalendar({
timezone: 'American/Indiana/Indianapolis'
});
You mentioned the gcal.js
and so, I am wondering if this needs to be defined like:
$('#calendar-selector-id-name').fullCalendar({
timezone: 'American/Indiana/Indianapolis',
eventSources:[{
url: 'https://www.google.com/calendar/feeds/...',
currentTimezone: 'American/Indiana/Indianapolis'
}]
});
Timezone problems when using Google Calendar #1801
EDIT
@jaykumarark did some further research and dug up the following:
Google Calendar - htmlLink not always defined #2844
Which revealed that for GoogleApps calendars, an initialized htmlLink
variable is not provided for events that only share free/busy information, and hide event details.
Jay also noted discovering the following work-around:
"commenting line 144 in gcal.js //url=injectQsComponent(url, 'ctz=' + timezoneArg);
I could represent times in a particular timezone irrespective of location."
So, in summary:
htmlLink
requiring an existence check, i.e. at some point the
javascript error will be addressed.Please refer to comments below for additional information/clarifications.
Upvotes: 2