Object options vs. 1.1.0 Full+Lite

An optional key value object that holds the calendar properties. The ng.Calendar class inherits the ng.Component.options and all it's properties.

Properties

String date_format (Optional - Default: D, d M Y) vs. 1.1.0 Full+Lite
A string that represent the display format for the selected date. We have adopted the PHP date specification for printing dates. Click here for more details.
String server_date_format (Optional - Default: Y-n-j) vs. 1.1.0 Full+Lite
A string that represent the date format sent when the the form is submitted. We have adopted the PHP date specification for printing dates. Click here for more details.
Integer num_months (Optional - Default: 1) vs. 1.1.0 Full+Lite
The number of months displayed in each page.
Integer num_col (Optional - Default: 3) vs. 1.1.0 Full+Lite
The number of months displayed in one row.
String css_prefix (Optional - Default: ng_cal_) vs. 1.1.0 Full+Lite
The CSS prefix for skinning the calendar on the same CSS file.
Integer start_day (Optional - Default: 0) vs. 1.1.0 Full+Lite
The starting day for the calendar in an numerical format between 0 to 6 (0-Sunday, 6-Saturday)
Date start_date (Optional - Default: today) vs. 1.1.0 Full+Lite
The starting date for the calendar. This can also be a string (see Date.from_string) or an object (see Date.from_object). All dates that are set as strings or objects will be relative to the start_date.
Date end_date (Optional - Default: year+10) vs. 1.1.0 Full+Lite
The ending date for the calendar. This can also be a string (see Date.from_string) or an object (see Date.from_object). If this is not a JavaScript date, it will be relative to the start_date value (e.g. year+10 is the ten years from the start date).
Boolean allow_selection (Optional - Default: true) vs. 1.1.0 Full+Lite
Allow the user to select a date or just view the calendar.
Boolean multi_selection (Optional - Default: false) vs. 1.1.0 Full+Lite
Allow the user to select more than one date. The value submitted when this option is set to true will be a comma separated list of dates. Therefore, we do not recommend using a comma in the server_date_format option.
Integer max_selection (Optional - Default: 0) vs. 1.1.0 Full+Lite
If multi_selection is set to true, the total number of dates the user can select. If set to 0, the user will be able to select any number of dates
Function formatter (date) (Optional - Default: (see description)) vs. 1.1.0 Full+Lite
Function that will return the default dates text. The default function will return the date translated based on the language. This function will receive the current date as a variable and this will refer to the calendar object.
Function selected_date_formatter (date) (Optional - Default: (see description)) vs. 1.1.0 FULL ONLY
Function that will return the selected date text. The default function will return the date translated based on the language. This function will receive the current date as a variable and should return a string. this will refer to the calendar object.
Function out_of_range_formatter (date) (Optional - Default: (see description)) vs. 1.1.0 FULL ONLY
Function that will return the out of range dates text. The default function will return the date translated based on the language. This function will receive the current date as a variable and should return a string. this will refer to the calendar object.
Function other_month_formatter (date) (Optional - Default: (see description)) vs. 1.1.0 FULL ONLY
Function that will return the previous or next month's dates text. The default function will return the date translated based on the language. This function will receive the current date as a variable and should return a string. this will refer to the calendar object.
Array dates_off (Optional - Default: Null) vs. 1.1.0 Full+Lite
An array of dates that represent the holidays or dates off (e.g. [new Date(), 'Jan 13th, 2013', {date:25, month:11} /* xmas */]). Strings or objects will be relative to the start date.
Boolean allow_dates_off_selection (Optional - Default: false) vs. 1.1.0 Full+Lite
Allow the user to select an off date.
Function dates_off_formatter (date) (Optional - Default: (see description)) vs. 1.1.0 FULL ONLY
Function that will return the dates off text. The default function will return the date translated based on the language. This function will receive the current date as a variable and should return a string. this will refer to the calendar object.
Array days_off (Optional - Default: Null) vs. 1.1.0 FULL ONLY
An array of integers for the off days (0 for Sun, 6 for Sat)
Boolean allow_days_off_selection (Optional - Default: false) vs. 1.1.0 FULL ONLY
Allow the user to select an off day
Function days_off_formatter (date) (Optional - Default: (see description)) vs. 1.1.0 FULL ONLY
Function that will return the days off text. The default function will return the date translated based on the language. This function will receive the current date as a variable and should return a string. this will refer to the calendar object.
Array range_off (Optional - Default: Null) vs. 1.1.0 FULL ONLY
Set a date range to be off (from a start to an end date). This should be an array of arrays for range offs. Each range off array contains two values, the start date and the end date. e.g. [['Sep 5th, 2012', 'Sep 10th, 2012'], ['Jan 1st, 2013', 'Jan 12th, 2013']]
Boolean allow_range_off_selection (Optional - Default: false) vs. 1.1.0 FULL ONLY
Allow the user to select a date in the range off.
Function range_off_formatter (date) vs. 1.1.0 FULL ONLY
Function that will return the range off dates text. The default function will return the date translated based on the language. This function will receive the current date as a variable and should return a string. this will refer to the calendar object.
Array weekend (Optional - Default: Null) vs. 1.1.0 Full+Lite
An array of integers for the weekend days (0 for Sun, 6 for Sat)
Boolean allow_weekend_selection (Optional - Default: false) vs. 1.1.0 Full+Lite
Allow the user to select an weekend date
Function weekend_formatter (date) (Optional - Default: (see description)) vs. 1.1.0 FULL ONLY
Function that will return the weekend dates text. The default function will return the date translated based on the language. This function will receive the current date as a variable and should return a string. this will refer to the calendar object.
Array force_selections (Optional - Default: Null) vs. 1.1.0 Full+Lite
An array of dates that will allow the user to select them regardless of their status.
Object date_on_avaliable (Optional - Default: Null) vs. 1.1.0 FULL ONLY
An object of functions that will run when the date is rendered. The key of each function must be a date in the following format m_d_y (1 for Jan) e.g. 1_15_2011. this will refer to the calendar and the table cell id will be passed as an argument.
String days_text (Optional - Default: mid) vs. 1.1.0 Full+Lite
A string to select the length of the days text on top of the calendar. Can be either 'char', 'short', 'mid', or 'long'
String months_text (Optional - Default: long) vs. 1.1.0 Full+Lite
A string to select the length of the months text on top of the calendar. Can be either 'short' or 'long'
String right_arrow_img (Optional - Default: (see description)) vs. 1.1.0 Full+Lite
The path to the right arrow image. Default is ng_config.assets_dir+'components/calendar/images/right_arrow.gif'
String right_arrow_img_disabled (Optional - Default: (see description)) vs. 1.1.0 Full+Lite
The path to the right arrow image disabled. Default is ng_config.assets_dir+'components/calendar/images/right_arrow_dis.gif'
String left_arrow_img (Optional - Default: (see description)) vs. 1.1.0 Full+Lite
The path to the left arrow image. Default is ng_config.assets_dir+'components/calendar/images/left_arrow.gif'
String left_arrow_img_disabled (Optional - Default: (see description)) vs. 1.1.0 Full+Lite
The path to the left arrow image disabled. Default is ng_config.assets_dir+'components/calendar/images/left_arrow_dis.gif'
String calendar_img (Optional - Default: (see description)) vs. 1.1.0 Full+Lite
The path to the calendar image. Default is ng_config.assets_dir+'components/calendar/images/calendar.gif'
String calendar_img_disabled (Optional - Default: (see description)) vs. 1.1.0 Full+Lite
The path to the calendar image disabled. Default is ng_config.assets_dir+'components/calendar/images/calendar_dis.gif'
String header_format (Optional - Default: F Y) vs. 1.1.0 Full+Lite
The calendar header date display (default is [Month] [Year]). See ng.Date.print for formatting options. This will only take effect in a single calendar. Multiple calendars will have the Year on the top header and the Month on each month table.
Boolean close_on_select (Optional - Default: true (false when multi_selection=true)) vs. 1.1.0 Full+Lite
Choose to close the calendar when the user select a date.
Date selected_date (Optional - Default: Null) vs. 1.1.0 Full+Lite
A date or an array of dates to select when the calendar is created. The calendar will take the input field value if this is null.
Date display_date (Optional - Default: null) vs. 1.1.0 Full+Lite
The date on which the calendar will first load when created. When null, this will be the same as the start_date. If this is a string or an object, it will be relative to the start_date.
Boolean hide_clear_button (Optional - Default: false) vs. 1.1.0 Full+Lite
When multi_selection is true, a clear selection button is visible in the bottom of the calendar. This option will hide the clear button if set to true.
Boolean hide_view_all_dates_button (Optional - Default: false) vs. 1.1.0 Full+Lite
When multi_selection is true, a view selected dates button is visible in the bottom of the calendar. This option will hide the view selected date button if set to true.

Inherit Options from ng.Component (options)

HTML_Element input (Optional - Default: Null) vs. 1.1.0 Full+Lite
An input field that is associated with the component. Focusing or clicking on this HTML Element will show the component.
String placement (Optional - Default: aaaa) vs. 1.1.0 Full+Lite
As of version 1.1.3, the default is set to aaaa which is an automatic placement based on the input field placement on the view port and the language. A string that represents the placement of the component. It consists of four letters to define the position of the component in relation to the input field. The letters are defined as the following:
  • First letter: The top or bottom of input field (either t or b)
  • Second letter: The left or right of the input field (either l or r)
  • Third letter: The top or bottom of the component (either t or b)
  • Fourth letter: The left or right of the component (either l or r)
For example, the value bltl will place the component top left position on the input bottom left position. From version 1.1.2 and below the default is bltl (for RTL languages brtr).
Boolean visible (Optional - Default: false) vs. 1.1.0 Full+Lite
Is the component always visible or does it appear and disappear based on the user interaction.
Object offset (Optional - Default: {x:0, y:0}) vs. 1.1.0 Full+Lite
An x and y object on how far to offset the component from the input and placement position (e.g. {x:5, y:5});
Button button (Optional - Default: Null) vs. 1.1.0 Full+Lite
An optional button that will toggle the component when clicked.
Component parent (Optional - Default: Null) vs. 1.1.0 Full+Lite
If the component is nested within other component, the parent should be included in this option. This option allow opening and closing sub components without changing the parents status.
Boolean disabled (Optional - Default: false) vs. 1.1.0 Full+Lite
True or false if the component should be disabled or not.
Boolean open_onfocus (Optional - Default: true) vs. 1.1.0 Full+Lite
Should the component be opened when the user focus on the input field.
Boolean open_onclick (Optional - Default: true) vs. 1.1.0 Full+Lite
Should the component be opened when the user clicks on the input field.
String button_ui_class Required vs. 1.2.0 Full+Lite
An optional class name to add to the component's buttons. This allow to change the color of the buttons for different components.
Integer responsive_top (Optional - Default: Null) vs. 1.2.1 Full+Lite
A fix top position for components in responsive layout. If set to null, the component will be centered on the screen. If the value is below 15, it will automatically changed to 15 (to keep the close button visible).
Integer responsive_left (Optional - Default: Null) vs. 1.2.1 Full+Lite
A fix left position for components in responsive layout. If set to null, the component will be centered on the screen.
Boolean is_moving_input (Optional - Default: false) vs. 1.2.1 Full+Lite
A read only value that indicates if the input fields is being moved from the normal position to the responsive position. This value should be checked if the input field has a blur event that change the component status because when the element is moved, some browsers trigger the blur event. For example: if (this.p.is_moving_input) return
String buttons_color (Optional - Default: transparent (Configuration value)) vs. 1.1.0 Full+Lite. Deprecated in vs 1.2.0
As of version 1.2.0, this option is deprecated and will be removed in version 1.2.5. The color of the created by the calendar.
String buttons_over_color (Optional - Default: #ffd06e (Configuration value)) vs. 1.1.0 Full+Lite. Deprecated in vs 1.2.0
As of version 1.2.0, this option is deprecated and will be removed in version 1.2.5. The color of the buttons when the mouse is over them.
String buttons_down_color (Optional - Default: Null (Configuration value)) vs. 1.1.0 Full+Lite. Deprecated in vs 1.2.0
As of version 1.2.0, this option is deprecated and will be removed in version 1.2.5. The color of the buttons when the user click on them.
String buttons_checked_color (Optional - Default: #f5be5b (Configuration value)) vs. 1.1.0 Full+Lite. Deprecated in vs 1.2.0
As of version 1.2.0, this option is deprecated and will be removed in version 1.2.5. The color of the calendar buttons when the component is opened.
String buttons_disable_color (Optional - Default: Null (Configuration value)) vs. 1.1.0 Full+Lite. Deprecated in vs 1.2.0
As of version 1.2.0, this option is deprecated and will be removed in version 1.2.5. The color of the buttons when the calendar is disabled.
Boolean button_light_border (Optional - Default: false (Configuration value)) vs. 1.1.4 Full+Lite. Deprecated in vs 1.2.0
As of version 1.2.0, this option is deprecated and will be removed in version 1.2.5. True or false to use a light border around the buttons. By default, the border is darker color of the button color, but if this is set to true, the border color is lighter. This is useful when the button is dark and the page background is dark as well.
Boolean buttons_gloss (Optional - Default: true (Configuration value)) vs. 1.1.0 Full+Lite. Deprecated in vs 1.2.0
As of version 1.2.0, this option is deprecated and will be removed in version 1.2.5. To show a gloss reflection on the button or not.

Inherit Options from ng.PlugIn (options)

HTML_Element object (Optional - Default: Null) vs. 1.1.0 Full+Lite
The HTML Element that will hold all the plugin output and handle all the events. By default, an new DIV will be created at the bottom of the body.
String language (Optional - Default: en (Configuration value)) vs. 1.1.0 Full+Lite
The default plugin language.

API Menu