public interface CalendarOptions
CalendarOptions
is a BBj Interface that defines the options, or configuration parameters, for the calendar.
Note: There are several available options that affect the user's ability to edit/modify calendar entries, some of which are related to one another and some that override other options. The table below lists all the options associated with editability along with their default values.
Option | Default | Overview |
---|---|---|
EnableEditable | 0 | Entries may be dragged and resized, meaning that their starting date/time and duration may be changed. This enables/disables both capabilities at the same time. If you don't want both, use the more specific EnableEntryStartEditable and EnableEntryDurationEditable instead. |
EnableEntryStartEditable | 1 | Entry start times may be modified by dragging the entire entry, meaning that the user can effectively reschedule the entry by changing its starting date/time |
EnableEntryResizableFromStart | 0 | Entry start times may be modified by dragging their starting edge, meaning that the user can change the entry's starting date/time which affects its duration |
EnableEntryDurationEditable | 1 | Entry end times may be modified by dragging their ending edge, meaning that the user can change the entry's ending date/time which affects its duration |
Modifier and Type | Method and Description |
---|---|
static BBjString |
CALENDAR_TOOLBAR_BUTTON_DAY()
A constant value that's used with the
CalendarOptions::setButtonText() method that uniquely identifies the 'day' toolbar button. |
static BBjString |
CALENDAR_TOOLBAR_BUTTON_LIST()
A constant value that's used with the
CalendarOptions::setButtonText() method that uniquely identifies the 'list' toolbar button. |
static BBjString |
CALENDAR_TOOLBAR_BUTTON_MONTH()
A constant value that's used with the
CalendarOptions::setButtonText() method that uniquely identifies the 'month' toolbar button. |
static BBjString |
CALENDAR_TOOLBAR_BUTTON_TODAY()
A constant value that's used with the
CalendarOptions::setButtonText() method that uniquely identifies the 'today' toolbar button. |
static BBjString |
CALENDAR_TOOLBAR_BUTTON_WEEK()
A constant value that's used with the
CalendarOptions::setButtonText() method that uniquely identifies the 'week' toolbar button. |
BBjString |
getAsFormattedString()
Returns a formatted, i.e.
|
JsonObject |
getAsJsonObject()
Returns the
CalendarOptions as a JsonObject. |
BBjNumber |
getAspectRatio()
Returns the width-to-height aspect ratio of the calendar.
|
BBjString |
getAsString()
Returns a stringified JsonObject representation of
CalendarOptions object. |
BBjString |
getButtonText(BBjString buttonName!)
Returns the text of the provided button or null() if the text has not been set, where the button is identified via a constant like CalenarAPI.CALENDAR_TOOLBAR_BUTTON_TODAY.
|
BBjString |
getDefaultTimedEntryDuration()
Returns the fallback duration for timed entries that do not have a specified end time.
|
BBjNumber |
getEnableDayHeaders()
Returns whether the day headers should appear for the Month, TimeGrid, and DayGrid views (1) or not (0).
|
BBjNumber |
getEnableEditable()
Returns whether the user can modify entries on the calendar (1) or not (0).
|
BBjNumber |
getEnableEntryDurationEditable()
Returns whether the user can modify entry durations on the calendar (1) or not (0).
|
BBjNumber |
getEnableEntryOverlap()
Returns whether entries being dragged and resized are allowed to overlap one other (1) or not (0).
|
BBjNumber |
getEnableEntryResizableFromStart()
Returns whether the user can resize an entry from its starting edge (1) or not (0).
|
BBjNumber |
getEnableEntryStartEditable()
Returns whether the user can modify event start times through dragging (1) or not (0).
|
BBjNumber |
getEnableExpandRows()
Returns whether a calendar view's rows will expand to fit the available height (1) or not (0).
|
BBjNumber |
getEnableFixedWeekCount()
Returns whether the calendar will always show 6 weeks in month view (1) or not (0).
|
BBjNumber |
getEnableNavLinks()
Returns whether day and week names are clickable (1) or not (0), causing the associated view to be loaded on click.
|
BBjNumber |
getEnableNowIndicator()
Returns whether the calendar will display a marker indicating the current time (1) or not (0).
|
BBjNumber |
getEnableSelectable()
Returns whether the user can highlight multiple days or timeslots by clicking and dragging (1) or not (0).
|
BBjNumber |
getEnableShowNonCurrentDates()
Returns whether the previous or next month's dates should display in the calendar's month view (1) or not (0).
|
BBjNumber |
getEnableSlotEntryOverlap()
Returns whether entries should visually overlap one another (1) or not (0).
|
BBjNumber |
getEnableUnselectAuto()
Returns whether clicking elsewhere on calendar/window causes the current selection to be cleared (1) or not (0).
|
BBjNumber |
getEnableWeekends()
Returns whether the calendar views include Saturday/Sunday columns (1) or not (0).
|
BBjNumber |
getEnableWeekNumbers()
Returns whether week numbers should be displayed on the calendar (1) or not (0).
|
BBjString |
getEntryBackgroundColor()
Returns the background color for all calendar entries.
|
BBjString |
getEntryBorderColor()
Returns the border color for all calendar entries.
|
BBjString |
getEntryColor()
Returns the background and border color for all calendar entries.
|
BBjString |
getEntryDisplay()
Returns the display setting parameter for the calendar entries.
|
BBjString |
getEntryTextColor()
Returns the text color for all calendar entries.
|
BBjNumber |
getFirstDay()
Returns the day on which each week begins where the value is a 0-based number starting with Sunday.
|
CalendarToolbar |
getFooterToolbar()
Returns the header or footer toolbar that's displayed on the calendar.
|
BBjString |
getGoogleCalendarApiKey()
Returns the API key that is used to access public Goolge Calendars programmatically.
|
CalendarToolbar |
getHeaderToolbar()
Returns the header or footer toolbar that's displayed on the calendar.
|
BBjString |
getHeight()
Returns the height setting parameter for the calendar.
|
BBjVector |
getHiddenDays()
Returns which days of the week should be hidden in the calendar in a BBjVector containing the day numbers that should be hidden.
|
BBjString |
getInitialDate()
Returns the initial date that the calendar displays.
|
BBjString |
getInitialView()
Returns the calendar's initial view type.
|
BBjString |
getLocale()
Returns the calendar's locale setting which defaults to null() and can be modified via the
setLocale() |
BBjString |
getSlotDuration()
Returns the time slot duration.
|
BBjString |
getSlotMaxTime()
Returns the maximum time slot (latest time) that will be displayed for each day in a time grid view.
|
BBjString |
getSlotMinTime()
Returns the minimum time slot (earliest time) that will be displayed for each day in a time grid view.
|
BBjString |
getSlotScrollTime()
Returns the time slot that the calendar initially scrolls to.
|
BBjString |
getTheme()
Returns the theme that the calendar is using.
|
BBjString |
getTimeZone()
Returns the calendar's timezone setting which defaults to "local".
|
BBjString |
getValidRangeEnd()
Returns the calendar's ending date that the user sees and interact with.
|
BBjString |
getValidRangeStart()
Returns the calendar's starting date that the user sees and interact with.
|
void |
setAspectRatio(BBjNumber aspectRatio)
Sets the width-to-height aspect ratio of the calendar, where the default value is 1.35 but by default is overridden by the default Height option.
|
void |
setButtonText(BBjString buttonName!,
BBjString buttonText!)
Sets the text of the provided button, where the button is identified via a constant like CalenarAPI.CALENDAR_TOOLBAR_BUTTON_TODAY.
|
void |
setDefaultTimedEntryDuration(BBjString defaultTimedEntryDuration!)
Sets the fallback duration for timed entries that do not have a specified end time, where the default value is "01:00" or one hour.
|
void |
setEnableDayHeaders(BBjNumber enableDayHeaders)
Sets whether the day headers should appear for the Month, TimeGrid, and DayGrid views (1) or not(0), where the default value is 1.
|
void |
setEnableEditable(BBjNumber enableEditable)
Sets whether the user can modify entries on the calendar (1) or not (0), where the default value is 0.
|
void |
setEnableEntryDurationEditable(BBjNumber enableEntryDurationEditable)
Sets whether the user can modify entry durations on the calendar (1) or not (0), where the default value is 1.
|
void |
setEnableEntryOverlap(BBjNumber enableEntryOverlap)
Sets whether entries being dragged and resized are allowed to overlap one other (1) or not (0), where the default value is 1.
|
void |
setEnableEntryResizableFromStart(BBjNumber enableEntryResizableFromStart)
Sets whether the user can resize an entry from its starting edge (1) or not (0), where the default value is 0.
|
void |
setEnableEntryStartEditable(BBjNumber enableEntryStartEditable)
Sets whether the user can modify event start times through dragging (1) or not (0), where the default value is 1.
|
void |
setEnableExpandRows(BBjNumber enableExpandRows)
Sets whether a calendar view's rows will expand to fit the available height (1) or not (0), where the default value is 0.
|
void |
setEnableFixedWeekCount(BBjNumber enableFixedWeekCount)
Sets whether the calendar will always show 6 weeks in month view (1) or not (0), where the default value is 1.
|
void |
setEnableNavLinks(BBjNumber enableNavLinks)
Sets whether day and week names are clickable (1) or not (0), causing the associated view to be loaded on click, where the default value is 0.
|
void |
setEnableNowIndicator(BBjNumber enableNowIndicator)
Sets whether the calendar will display a marker indicating the current time (1) or not (0), where the default value is 0.
|
void |
setEnableSelectable(BBjNumber enableSelectable)
Sets whether the user can highlight multiple days or timeslots by clicking and dragging (1) or not (0), where the default value is 0.
|
void |
setEnableShowNonCurrentDates(BBjNumber enableShowNonCurrentDates)
Sets whether the previous or next month's dates should display in the calendar's month view (1) or not (0), where the default value is 1.
|
void |
setEnableSlotEntryOverlap(BBjNumber enableSlotEntryOverlap)
Sets whether entries should visually overlap one another (1) or not (0) where the default value is 1.
|
void |
setEnableUnselectAuto(BBjNumber enableUnselectAuto)
Sets whether clicking elsewhere on calendar/window causes the current selection to be cleared (1) or not (0), where the default value is 1.
|
void |
setEnableWeekends(BBjNumber enableWeekends)
Sets whether to include Saturday/Sunday columns in any of the calendar views (1) or not (0), where the default value is 1.
|
void |
setEnableWeekNumbers(BBjNumber enableWeekNumbers)
Sets whether week numbers should be displayed on the calendar (1) or not (0), where the default value is 0.
|
void |
setEntryBackgroundColor(BBjColor entryBackgroundColor!)
Sets the background color for all calendar entries, unless overridden by the
CalendarEntry object itself. |
void |
setEntryBackgroundColor(BBjString backgroundColor!)
Sets the background color for all calendar entries, unless overridden by the
CalendarEntry object itself. |
void |
setEntryBorderColor(BBjColor entryBorderColor!)
Sets the border color for all calendar entries, unless overridden by the
CalendarEntry object itself. |
void |
setEntryBorderColor(BBjString borderColor!)
Sets the border color for all calendar entries, unless overridden by the
CalendarEntry object itself. |
void |
setEntryColor(BBjColor entryColor!)
Sets the combined background and border color for all calendar entries, unless overridden by the
CalendarEntry object itself. |
void |
setEntryColor(BBjString color!)
Sets the background and border color for all calendar entries, unless overridden by the
CalendarEntry object itself. |
void |
setEntryDisplay(BBjString entryDisplay!)
Sets how entries are rendered on the calendar, where the default value is "auto".
|
void |
setEntryTextColor(BBjColor entryTextColor!)
Sets the text color for all calendar entries, unless overridden by the
CalendarEntry object itself. |
void |
setEntryTextColor(BBjString textColor!)
Sets the text color for all calendar entries, unless overridden by the
CalendarEntry object itself. |
void |
setFirstDay(BBjNumber firstDay)
Sets the day on which each week begins where the value is a 0-based number starting with Sunday, where the default value is 0.
|
void |
setFooterToolbar(CalendarToolbar toolbar!)
Sets the footer toolbar that's displayed on the calendar given a previously-defined
CalendarToolbar object. |
void |
setGoogleCalendarApiKey(BBjString googleCalendarApiKey!)
Sets the API key that is used to access public Goolge Calendars programmatically, where the default value can only be used for testing and should be changed before use in a production environment.
|
void |
setHeaderToolbar(CalendarToolbar toolbar!)
Sets the header toolbar that's displayed on the calendar given a previously-defined
CalendarToolbar object. |
void |
setHeight(BBjString height!)
Sets the height of the calendar, where the default value is "100%".
|
void |
setHiddenDays(BBjString hiddenDays!)
Sets which days of the week should be hidden in the calendar
|
void |
setHiddenDays(BBjVector hiddenDays!)
Sets which days of the week should be hidden in the calendar, and defaults to an empty vector []
which means that none of the days will be hidden.
|
void |
setInitialDate(BBjString initialDate!)
Sets the initial date that the calendar displays, where the default value is the current date.
|
void |
setInitialView(BBjString initialView!)
Sets the initial view type when the calendar loads, where the default value is
CalendarAPI.CALENDAR_VIEW_DAY_GRID_MONTH() . |
void |
setLocale(BBjString locale!)
Sets the locale for the calendar.
|
void |
setSlotDuration(BBjString slotDuration!)
Sets the frequency for displaying time slots, where the default value is "00:30:00" which translates to 30 minutes.
|
void |
setSlotMaxTime(BBjString slotMaxTime!)
Sets the maximum time slot (latest time) that will be displayed for each day, where the default value is "24:00:00" (midnight).
|
void |
setSlotMinTime(BBjString slotMinTime!)
Sets the minimum time slot (earliest time) that will be displayed for each day, where the default value is "00:00:00" (midnight).
|
void |
setSlotScrollTime(BBjString slotScrollTime!)
Sets the time slot that the calendar initially scrolls to, where the default value is "06:00:00" or 6 AM.
|
void |
setTheme(BBjString theme!)
Sets the theme that the calendar uses.
|
void |
setTimeZone(BBjString timeZone!)
Sets the calendar's timezone, where the default value is "local" for the user's local timezone.
|
void |
setValidRangeEnd(BBjString validRangeEnd!)
Sets the calendar's ending date that the user sees and interact with, where the default value is unset (null()) as setting it limits the dates shown.
|
void |
setValidRangeStart(BBjString validRangeStart!)
Sets the calendar's starting date that the user sees and interact with, where the default value is unset (null()) as setting it limits the dates shown.
|
static BBjString CALENDAR_TOOLBAR_BUTTON_TODAY()
CalendarOptions::setButtonText()
method that uniquely identifies the 'today' toolbar button.static BBjString CALENDAR_TOOLBAR_BUTTON_MONTH()
CalendarOptions::setButtonText()
method that uniquely identifies the 'month' toolbar button.static BBjString CALENDAR_TOOLBAR_BUTTON_WEEK()
CalendarOptions::setButtonText()
method that uniquely identifies the 'week' toolbar button.static BBjString CALENDAR_TOOLBAR_BUTTON_DAY()
CalendarOptions::setButtonText()
method that uniquely identifies the 'day' toolbar button.static BBjString CALENDAR_TOOLBAR_BUTTON_LIST()
CalendarOptions::setButtonText()
method that uniquely identifies the 'list' toolbar button.void setEnableWeekends(BBjNumber enableWeekends)
BBjNumber
- enableWeekends A BBjNumber acting as a boolean that determines whether to include Saturday/Sunday columns in any of the calendar views (1) or not (0).BBjNumber getEnableWeekends()
void setEnableDayHeaders(BBjNumber enableDayHeaders)
Applicable views: CalendarAPI.CALENDAR_VIEW_DAY_GRID_MONTH(), CalendarAPI.CALENDAR_VIEW_DAY_GRID_WEEK(),
CalendarAPI.CALENDAR_VIEW_TIME_GRID_DAY(), CalendarAPI.CALENDAR_VIEW_TIME_GRID_WEEK()
.
BBjNumber
- enableDayHeaders A BBjNumber acting as a boolean that determines whether the day headers should appear for the Month, TimeGrid, and DayGrid views (1) or not (0).BBjNumber getEnableDayHeaders()
void setEnableShowNonCurrentDates(BBjNumber enableShowNonCurrentDates)
Applicable views: CalendarAPI.CALENDAR_VIEW_DAY_GRID_MONTH()
BBjNumber
- enableShowNonCurrentDates A BBjNumber acting as a boolean that determines whether the previous or next month's dates should display in the calendar's month view (1) or not (0).BBjNumber getEnableShowNonCurrentDates()
void setEnableEntryOverlap(BBjNumber enableEntryOverlap)
Note: This may be overridden on a per-entry basis.
BBjNumber
- enableEntryOverlap A BBjNumber acting as a boolean that determines whether entries being dragged and resized are allowed to overlap one other (1) or not (0).BBjNumber getEnableEntryOverlap()
void setEnableFixedWeekCount(BBjNumber enableFixedWeekCount)
Setting this variable to 0 changes the calendar to show 4, 5, or 6 weeks in the month view, depending on how many days the month has. With the default value of 1, the calendar may show an empty sixth week at the bottom of the month view, depending on the number of days in the month.
Applicable views: CalendarAPI.CALENDAR_VIEW_DAY_GRID_MONTH()
BBjNumber
- enableFixedWeekCount A BBjNumber acting as a boolean that determines whether the calendar will always show 6 weeks in month view (1) or not (0).BBjNumber getEnableFixedWeekCount()
void setEnableNowIndicator(BBjNumber enableNowIndicator)
Setting this to 1 causes the calendar to display a marker showing the current time in applicable time grid views.
Applicable views: CalendarAPI.CALENDAR_VIEW_TIME_GRID_DAY(), CalendarAPI.CALENDAR_VIEW_TIME_GRID_WEEK()
BBjNumber
- enableNowIndicator A BBjNumber acting as a boolean that determines whether the calendar will display a marker indicating the current time (1) or not (0).BBjNumber getEnableNowIndicator()
void setEnableEditable(BBjNumber enableEditable)
Setting this variable to 1 causes the entries to be both draggable and resizable. If you don't want both behaviors,
use the setEnableEntryStartEditable()
or setEnableEntryDurationEditable()
methods instead.
Note: See the top of the CalendarOptions()
class docs for an overview of the options that affect entry editabililty.
BBjNumber
- enableEditable A BBjNumber acting as a boolean that determines whether the user can modify entries on the calendar (1) or not (0).BBjNumber getEnableEditable()
void setEnableEntryDurationEditable(BBjNumber enableEntryDurationEditable)
Note: See the top of the CalendarOptions()
class docs for an overview of the options that affect entry editabililty.
BBjNumber
- enableEntryDurationEditable A BBjNumber acting as a boolean that determines whether the user can modify entry durations on the calendar (1) or not (0).BBjNumber getEnableEntryDurationEditable()
void setEnableSelectable(BBjNumber enableSelectable)
This is used with the CalendarAPI.ON_CALENDAR_SELECT
and CalendarAPI.ON_CALENDAR_UNSELECT
callbacks
to monitor selection events. You must set the calendar's options to enable selectability in order for the events to be fired.
The CalendarOptions::setEnableUnselectAuto()
impacts what causes the CalendarAPI.ON_CALENDAR_SELECT
event to be fired.
How the calendar reacts to the user selecting a date or range of dates all depends on what your callback code does in response to the events. It could prompt the user to enter a new event title, or display a contextual popup-menu that allows the user to move/copy/edit/delete any events within the selected range.
BBjNumber
- enableSelectable A BBjNumber acting as a boolean that determines whether the user can highlight multiple days or timeslots by clicking and dragging (1) or not (0).BBjNumber getEnableSelectable()
void setEnableUnselectAuto(BBjNumber enableUnselectAuto)
This is only applicable if EnableSelectable() is set to 1.
BBjNumber
- enableUnselectAuto A BBjNumber acting as a boolean that determines whether clicking elsewhere on calendar/window causes the current selection to be cleared (1) or not (0).BBjNumber getEnableUnselectAuto()
void setEnableEntryStartEditable(BBjNumber enableEntryStartEditable)
Note: See the top of the CalendarOptions()
class docs for an overview of the options that affect entry editabililty.
BBjNumber
- enableEntryStartEditable A BBjNumber acting as a boolean that determines whether the user can modify event start times through dragging (1) or not (0).BBjNumber getEnableEntryStartEditable()
void setEnableEntryResizableFromStart(BBjNumber enableEntryResizableFromStart)
Note: See the top of the CalendarOptions()
class docs for an overview of the options that affect entry editabililty.
BBjNumber
- enableEntryResizableFromStart A BBjNumber acting as a boolean that determines whether the user can resize an entry from its starting edge (1) or not (0).BBjNumber getEnableEntryResizableFromStart()
void setEnableSlotEntryOverlap(BBjNumber enableSlotEntryOverlap)
Setting this value to 0 prevents the entries from overlapping one another. This applies to entries in the
CalendarAPI.CALENDAR_VIEW_TIME_GRID_DAY()
and CalendarAPI.CALENDAR_VIEW_TIME_GRID_WEEK()
view types.
BBjNumber
- enableSlotEntryOverlap A BBjNumber acting as a boolean that determines whether entries should visually overlap one another (1) or not (0).BBjNumber getEnableSlotEntryOverlap()
void setEnableNavLinks(BBjNumber enableNavLinks)
BBjNumber
- enableNavLinks A BBjNumber acting as a boolean that determines whether day and week names are clickable (1) or not (0).BBjNumber getEnableNavLinks()
void setEnableWeekNumbers(BBjNumber enableWeekNumbers)
BBjNumber
- enableWeekNumbers A BBjNumber acting as a boolean that determines whether week numbers should be displayed on the calendar (1) or not (0).BBjNumber getEnableWeekNumbers()
void setEnableExpandRows(BBjNumber enableExpandRows)
BBjNumber
- enableExpandRows A BBjNumber acting as a boolean that determines whether a calendar view's rows will expand to fit the available height (1) or not (0).BBjNumber getEnableExpandRows()
void setAspectRatio(BBjNumber aspectRatio)
The calendar is a block-level element that fills its entire avaiable width. The calendar's height, however, is determined by this ratio of width to height. Because it's a ratio of the width to height, larger numbers result in smaller (or shorter) heights.
Note: The Height option, if set, will override the AspectRatio. Therefore, if you intend to set the calendar's height via the AspectRatio then you will need to unset the Height option by setting it to null() or an empty string.
BBjNumber
- aspectRatio The width-to-height aspect ratio of the calendar.BBjNumber getAspectRatio()
void setFirstDay(BBjNumber firstDay)
The value is zero-based and ranges from 0 (Sunday) to 6 (Saturday).
BBjNumber
- firstDay A BBjNumber corresponding to the beginning day of the week where the value is zero-based and ranges from 0 (Sunday) to 6 (Saturday).BBjNumber getFirstDay()
void setHeight(BBjString height!)
Note that you may set the calendar's height in multiple ways. The Height option defaults to "100%",
meaning that it will match the height of its container, which is the BBjCalendarWidget
's height.
Valid options for the height values are:
BBjCalendarWidget
's height.Note: The Height option, if set, will override the AspectRatio. Therefore, if you intend to set the calendar's height via the AspectRatio then you will need to unset the Height option by setting it to null() or an empty string.
BBjString
- height! A BBjString corresponding to the desired height setting as listed above.BBjString getHeight()
setHeight()
method.void setButtonText(BBjString buttonName!, BBjString buttonText!)
BBjString
- buttonName! The toolbar button to which the new text should apply, that is identified via a constant like CalenarAPI.CALENDAR_TOOLBAR_BUTTON_TODAY.BBjString
- buttonText! The desired button text.BBjString getButtonText(BBjString buttonName!)
BBjString
- buttonName! The toolbar button that is identified via a constant like CalenarAPI.CALENDAR_TOOLBAR_BUTTON_TODAY.void setEntryDisplay(BBjString entryDisplay!)
Valid options are for the entry display are:
BBjString
- entryDisplay! A BBjString corresponding to the desired display setting as listed above.BBjString getEntryDisplay()
setEntryDisplay()
method.void setSlotDuration(BBjString slotDuration!)
You can increase or decrease the slot duration in certain views by modifying this value. The format of the string is "HH:MM:SS" where H = hours, M = minutes, and S = seconds. For example, to increase the granularity of the timeslots on the calendar you can set each slot to be 5 minutes by passing in the value "00:05:00".
Applicable views: CalendarAPI.CALENDAR_VIEW_TIME_GRID_DAY(), CalendarAPI.CALENDAR_VIEW_TIME_GRID_WEEK()
BBjString
- slotDuration! A BBjString corresponding to the desired time slot duration.530
- if an invalid date/time parameter is providedBBjString getSlotDuration()
void setSlotMinTime(BBjString slotMinTime!)
You can affect the starting time displayed on the calendar by modifying this value. The format of the string is "HH:MM:SS" where H = hours, M = minutes, and S = seconds. For example, to have the day start at 6:30 AM you can set this variable to "06:30:00".
BBjString
- slotMinTime! A BBjString corresponding to the earliest time slot to be displayed in a time grid view.530
- if an invalid date/time parameter is providedBBjString getSlotMinTime()
void setSlotMaxTime(BBjString slotMaxTime!)
You can affect the ending time displayed on the calendar by modifying this value. The format of the string is "HH:MM:SS" where H = hours, M = minutes, and S = seconds. For example, to have the day end at, and include, 9:30 PM you can set this variable to "21:31:00".
Note: This should be specified as an exclusive end time, meaning that it indicates the ending time up to, but not including, this value. Therefore, the default of "24:00:00" means that time slots up to and including "23:59:59" will be displayed, but "24:00:00" will not be displayed.
BBjString
- slotMaxTime! A BBjString corresponding to the latest time slot to be displayed in a time grid view.530
- if an invalid date/time parameter is providedBBjString getSlotMaxTime()
void setSlotScrollTime(BBjString slotScrollTime!)
This only affects the initial position and does not prevent users from scrolling forwards and backwards from this time slot. If you need to prevent users from seeing earlier or later timeslots, use the SlotMinTime and/or SlotMaxTime options instead.
Valid options are:
BBjString
- slotScrollTime! A BBjString corresponding to the initial time slot that the calendar initially scrolls to.530
- if an invalid date/time parameter is providedBBjString getSlotScrollTime()
void setTimeZone(BBjString timeZone!)
Whereas the local timezone will vary from browser to browser, the "UTC" time zone is guaranteed to be the same in every browser. It will also not experience daylight savings times. The UTC time zone was designed this way and it serves as a time zone that other time zones define themselves relative to.
Valid options are "local", "UTC", or a named timezone like "MST" or "America/New_York".
BBjString
- timeZone! A BBjString corresponding to the calendar's desired timezone.BBjString getTimeZone()
void setInitialView(BBjString initialView!)
CalendarAPI.CALENDAR_VIEW_DAY_GRID_MONTH()
.
The initial view can be set to any of the CalendarAPI.CALENDAR_VIEW_*
types.
BBjString
- initialView! A BBjString corresponding to the desired view type.BBjString getInitialView()
void setInitialDate(BBjString initialDate!)
The value can be anything that can parse into a date, including a simple ISO8601 date string like "2014-02-01" or an advanced string like "2018-06-01T12:30:00-05:00" that specifies a date, time, and has a -05:00 UTC offset.
BBjString
- initialDate! A BBjString corresponding to the desired initial date.530
- if an invalid date/time parameter is providedBBjString getInitialDate()
void setValidRangeStart(BBjString validRangeStart!)
The value can be anything that can parse into a date, including a simple ISO8601 date string like "2014-02-01". If your application needs to limit the timeframes for an appointment, you can provide a starting and/or ending date to set a valid modification range. That way, the calendar displays the invalid dates differently and the user may only move an entry inside the valid range. If they attempt to move an entry outside of the valid range, the entry will move back to its original position and the calendar cancels the user's modification. This has several benefits, including:
rem Get and then set the desired options inline dynamically, calling the render() method afterwards to force the calendar to update with the new configuration: myCal!.getOptions().setValidRangeStart(date(jul(0, 0, 0), "%Yl-%Mz-%Dz")) myCal!.render()
BBjString
- validRangeStart! A BBjString corresponding to the calendar's starting date.530
- if an invalid date/time parameter is providedBBjString getValidRangeStart()
void setValidRangeEnd(BBjString validRangeEnd!)
The value can be anything that can parse into a date, including a simple ISO8601 date string like "2014-02-01". If your application needs to limit the timeframes for an appointment, you can provide a starting and/or ending date to set a valid modification range. That way, the calendar displays the invalid dates differently and the user may only move an entry inside the valid range. If they attempt to move an entry outside of the valid range, the entry will move back to its original position and the calendar cancels the user's modification. This has several benefits, including:
rem Get and then set the desired options inline dynamically, calling the render() method afterwards to force the calendar to update with the new configuration: myCal!.getOptions().setValidRangeStart(date(jul(0, 0, 0), "%Yl-%Mz-%Dz")) myCal!.render()
BBjString
- validRangeEnd! A BBjString corresponding to the calendar's ending date.530
- if an invalid date/time parameter is providedBBjString getValidRangeEnd()
void setDefaultTimedEntryDuration(BBjString defaultTimedEntryDuration!)
This only applies to entries that are not designated as all-day entries.
BBjString
- defaultTimedEntryDuration! A BBjString with the fallback duration for timed entries that do not have a specified end time in an ISO 8601 time format like "02:00" for two hours.530
- if an invalid date/time parameter is providedBBjString getDefaultTimedEntryDuration()
void setGoogleCalendarApiKey(BBjString googleCalendarApiKey!)
Note: THIS KEY WON'T WORK IN PRODUCTION! Before accessing a public Google calendar, you must create your own developer API key and set this option to your key's value.
BBjString
- googleCalendarApiKey! A BBjString filled with your Google developer API key.BBjString getGoogleCalendarApiKey()
void setTheme(BBjString theme!)
The BBjCalendarWidget
has several options for modifying its appearance via themes. By default,
the calendar uses a standard default theme. However, it's possible to change its appearance by applying
a theme, which is a Bootstrap-compatible CSS file. Therefore, you can change the calendar's default
appearance by applying the default Bootstrap theme, or a custom Bootstrap theme. The BBjCalendarWidget
comes pre-installed with several free Bootstrap themes that were obtained from
https://bootswatch.com/ and are installed in the
BBjCalendarWidget
's lib/bootstrap/themes/
directory. Each theme consists of a
subdirectory based on the name of the theme with two files in the directory: bootstrap.css
and
bootstrap.min.css
. The minimized version is used unless the calendar is set to debug mode.
Note that there are many more freely-available Bootstrap-compatible themes besides those that come
pre-installed with the BBjCalendarWidget
. You many choose to download other free themes,
or purchase a theme, and use it with the calendar. To do so, ensure that the CSS files are installed
in a directory named after the theme under the BBjCalendarWidget/lib/bootstrap/themes/
directory.
The calendar widget will use the appropriate CSS file, bootstrap.css
or bootstrap.min.css
from that directory based on whether the calendar is in debug mode or not.
Possible values for the theme are:
"standard"
- The default calendar theme, which doesn't use Bootstrap."bootstrap"
- The default Bootstrap theme."<theme_name>"
- A custom bootstrap-compatible theme such as "slate", which is the name of the theme directory under the BBjCalendarWidget/lib/bootstrap/themes/
directory.BBjString
- theme! A BBjString filled with the desired theme name.BBjString getTheme()
void setHeaderToolbar(CalendarToolbar toolbar!)
CalendarToolbar
object. To disable (remove or hide) the toolbar from the calendar, call this
method providing null()
for the CalendarToolbar
object.
Note that the calendar's option define a header toolbar by default.
CalendarToolbar
- toolbar! A CalendarToolbar
object that has been previously defined, or null()
to disable the toolbar.CalendarToolbar getHeaderToolbar()
CalendarToolbar
object or null()
if the toolbar has been disabled.void setFooterToolbar(CalendarToolbar toolbar!)
CalendarToolbar
object. To disable (remove or hide) the toolbar from the calendar, call this
method providing null()
for the CalendarToolbar
object.
Note that the calendar's option do NOT define a footer toolbar by default.
CalendarToolbar
- toolbar! A CalendarToolbar
object that has been previously defined, or null()
to disable the toolbar.CalendarToolbar getFooterToolbar()
CalendarToolbar
object or null()
if the toolbar has been disabled.void setHiddenDays(BBjVector hiddenDays!)
The vector is filled with the day-of-week indices to hide, where each index is zero-based and ranges
from 0 (Sunday) to 6 (Saturday). For example, by adding the numbers 1, 3, and 5 to the vector then Mondays,
Wednesdays, and Fridays will be hidden. Note that you can also hide weekends via the EnableWeekends()
method.
BBjVector
- hiddenDays! A BBjVector filled with day numbers where the value is zero-based and ranges from 0 (Sunday) to 6 (Saturday).void setHiddenDays(BBjString hiddenDays!)
This is similar to the setHiddenDays()
method that takes a BBjVector except that it takes a comma-delimted string of tags for succinctness.
BBjString
- hiddenDays! A comma-delimted string of day numbers such as "1, 3, 5" to indicate that Mondays, Wednesdays, and Fridays should be hidden.BBjVector getHiddenDays()
void setEntryBackgroundColor(BBjColor entryBackgroundColor!)
CalendarEntry
object itself.
This is similar to the setEntryBackgroundColor()
method that takes a BBjString except that it takes a BBjColor object for convenience.
Note: This can be overridden for specific calendar entries via the CalendarEntry
's methods.
BBjColor
- entryBorderColor! A BBjColor that determines the background color for all calendar entries.void setEntryBackgroundColor(BBjString backgroundColor!)
CalendarEntry
object itself.
This is similar to the setEntryBackgroundColor()
method that takes a BBjColor except that it takes any valid CSS color string for succinctness.
Colors may be specified as any valid CSS color, so "red"
, "rgb(255, 0, 0)"
, "#ff0000"
, "#f00"
, "hsl(0, 100%, 50%)"
, and all the versions of those formats that include an alpha channel are valid ways of specifying the color red.
Note: This can be overridden for specific calendar entries via the CalendarEntry
's methods.
BBjString
- backgroundColor! A BBjString that contains the color for the entry's background.BBjString getEntryBackgroundColor()
void setEntryBorderColor(BBjColor entryBorderColor!)
CalendarEntry
object itself.
This is similar to the setEntryBorderColor()
method that takes a BBjString except that it takes a BBjColor object for convenience.
Note: This can be overridden for specific calendar entries via the CalendarEntry
's methods.
BBjColor
- entryBorderColor! A BBjColor that determines the border color for all calendar entries.void setEntryBorderColor(BBjString borderColor!)
CalendarEntry
object itself.
This is similar to the setEntryBorderColor()
method that takes a BBjColor except that it takes any valid CSS color string for succinctness.
Colors may be specified as any valid CSS color, so "red"
, "rgb(255, 0, 0)"
, "#ff0000"
, "#f00"
, "hsl(0, 100%, 50%)"
, and all the versions of those formats that include an alpha channel are valid ways of specifying the color red.
Note: This can be overridden for specific calendar entries via the CalendarEntry
's methods.
BBjString
- borderColor! A BBjString that contains the color for the entry's border.BBjString getEntryBorderColor()
void setEntryTextColor(BBjColor entryTextColor!)
CalendarEntry
object itself.
This is similar to the setEntryTextColor()
method that takes a BBjString except that it takes a BBjColor object for convenience.
Note: This can be overridden for specific calendar entries via the CalendarEntry
's methods.
BBjColor
- entryTextColor! A BBjColor that determines the text color for calendar entries.void setEntryTextColor(BBjString textColor!)
CalendarEntry
object itself.
This is similar to the setEntryTextColor()
method that takes a BBjColor except that it takes any valid CSS color string for succinctness.
Colors may be specified as any valid CSS color, so "red"
, "rgb(255, 0, 0)"
, "#ff0000"
, "#f00"
, "hsl(0, 100%, 50%)"
, and all the versions of those formats that include an alpha channel are valid ways of specifying the color red.
Note: This can be overridden for specific calendar entries via the CalendarEntry
's methods.
BBjString
- textColor! A string that BBjString the color for the entry's text.BBjString getEntryTextColor()
void setEntryColor(BBjColor entryColor!)
CalendarEntry
object itself.
This is similar to the setEntryColor()
method that takes a BBjString except that it takes a BBjColor object for convenience.
Note: This can be overridden for specific calendar entries via the CalendarEntry
's methods.
BBjColor
- entryColor! A BBjColor that is used for the background and border for calendar entries.void setEntryColor(BBjString color!)
CalendarEntry
object itself.
This is similar to the setEntryColor()
method that takes a BBjColor except that it takes any valid CSS color string for succinctness.
Colors may be specified as any valid CSS color, so "red"
, "rgb(255, 0, 0)"
, "#ff0000"
, "#f00"
, "hsl(0, 100%, 50%)"
, and all the versions of those formats that include an alpha channel are valid ways of specifying the color red.
Note: This can be overridden for specific calendar entries via the CalendarEntry
's methods.
BBjString
- color! A BBjString that contains the color for the entry's background and border.BBjString getEntryColor()
void setLocale(BBjString locale!)
BBjString
- locale! A BBjString that contains the desired locale, such as "en-US" for US English, "fr-FR" or "fr" for French (France), "es-MX" for Spanish (Mexico), etc.BBjString getLocale()
setLocale() method.
JsonObject getAsJsonObject()
CalendarOptions
as a JsonObject.BBjString getAsString()
CalendarOptions
object.BBjString getAsFormattedString()
CalendarOptions
object.CalendarOptions
in formatted stringified JSON format.