PropertyEventMethodIndex
WebSquare.uiplugin.scheduleCalendar - 5.0_4.4547B.20211124.201933

ScheduleCalendar Shows schedules on a calendar.
Provides three design types.

Type

uiplugin

Property Summary

class
Same as the class property in HTML.
cssRenderOrder
Changes the CSS file rendering order. [default: false, true]
dataList
Set the DataList to bind with the ScheduleCalendar. [default: ""]
defaultDate
Date to be set in the initially loaded component. [default: ""]
defaultView
Schedule unit in the initial ScheduleCalendar.
editable
Changes the schedule. [default: false, true]
endColumn
Column ID in the DataList to use as the ending date of the schedule.
eventLimit
Limits the number of the events to be displayed.
eventOrderColumn
Column ID in the DataList to use when sorting the schedules.
headerLeftBtn
[default:true, false] Displays three buttons ("<", ">", and "Today") on the upper-left corner. Displays previous month/week/day upon the end user’s clicking "<" button. Displays next month/week/day upon the end user’s clicking ">" button. Clicking "Today" will display current month/week/day.</xmp></xmp>
headerRightBtn
Displays the schedule unit buttons (“Month”, “Week”, and “Day”) on the upper-right corner. [default:true, false] "Month" - Changes schedules on a monthly basis. "Week" - Changes schedules on a weekly basis. "Day" - Changes the schedule on a weekly basis.</xmp></xmp>
headerTitle
Displays the center title of the header.
id
Component ID
idColumn
Column ID in the DataList to use as the ID of the schedule.
includeScheduleEnd
Handles display of the last date of the schedule on the screen. This is due to the internal policy of the fullCalendar. [default:false, true]
ioFormat
Date format for start and end columns.
lang
Language to be used in the ScheduleCalanedar.
locale
Set the language to use in the ScheduleCalanedar of which version is 3.6 or higher. [default: ko, en]
nextDayThreshold
Reference time to render the schedule on the day in which the schedule ends. (HH:mm:ss) [Default: "09:00:00"]
selectable
Allows selection of multiple dates. [default: false, true]
startColumn
Column ID in the DataList to use as the ending date of the schedule.
tabIndex
The focusing order of the component by the Tab key. [default: ""]
themeColumn
Column ID in the DataList to set the theme of the schedule. [default: ""]
timeFormat
Time format displayed on the schedule.
titleColumn
Title of the schedule
tooltipDisplay
Displays tooltip for the user’s selection.
version
Library version to be used in the ScheduleCalendar.

Event Summary

onaddschedule
Triggered upon a schedule being added by addSchedule() method or selectable property setting.
onclick
Triggered upon clicking of the date.
onmoveschedule
Triggered upon a schedule being moved or resized by mouse dragging-and-dropping.

Method Summary

addClass( className )
Adds a CSS class to the component.
addSchedule( schedule )
Adds a schedule.
bind( eventType , function )
Dynamically allocate an event and the handler function to the component.
changeClass( oldClassName , newClassName )
Changes the class currently applied to the corresponding WebSquare component. (Supported in all WebSquare components.)
changeView( view )
Changes the view of the ScheduleCalendar.
focus( )
Focuses the WebSquare component.
getDataListInfo( )
Returns the dataList bound with the component.
getDisabled( )
Returns the current value of the disabled property.
getGenerator( )
In case generated by the Generator component, returns the parent Generator object that created the component itself.
getID( )
Returns the ID of the WebSquare component.
getInitStyle( CSS )
Returns the initial style of the WebSquare component.
getOpacity( )
Returns the opacity of the WebSquare component. (Supported in all WebSquare components.)
getOriginalID( )
Returns the originalID of the WebSquare component. (Supported in all WebSquare components.)
getPluginName( )
Returns the name of the WebSquare component.
getPosition( positionName )
Returns the position (left and top) of the WebSquare component. (Supported in all WebSquare components.)
getReadOnly( )
Returns the current value of the readOnly property.
getScheduleInfo( id )
Returns the schedule information.
getScope( )
For the child component of a scope="true" WFrame, returns the parent WFrame object. (Supported in all WebSquare components.)
getScopeWindow( )
For the child component of a scope="true" WFrame, returns the parent WFrame object. (Supported in all WebSquare components.)
getSize( sizeName )
Sets the size (width and height) of the WebSquare component. (Supported in all WebSquare components.)
getStyle( propertyName )
Returns the CSS setting of the WebSquare component.
getStyleValue( style )
[deprecated]
getTitle( )
Returns the title of the WebSquare component.
getUdcHome( )
Returns the path of the UDC file including the file name in which the UDC object is defined. (Supported in all WebSquare components.)
getUdcRoot( )
Returns the path of the UDC file in which the UDC object is defined. (Supported in all WebSquare components.)
getUserData( key )
Returns the value set by setUserData or directly defined by the user in the XML file.
getView( )
Gets the current view of the ScheduleCalendar.
gotoCalendar( dateStr )
Goes to the specified date.
hasClass( className )
Checks whether the WebSquare component has a certain class.
hide( )
Hides the WebSquare component. (Supported in all WebSquare components.)
removeClass( className )
Removes a class from the WebSquare component. (Supported in all WebSquare components.)
removeschedule( id )
Removes the schedule.
setDayNameStyle( options )
Sets the style for the day column of the calendar.
setDisabled( disabled )
Sets the disabled property of the WebSquare component.
setEventPause( evList , flag )
Pauses the event.
setHeaderBtn( Options )
Sets the buttons and titles on the upper-right and the upper-left parts of the calendar.
setInitStyle( property )
Restores the initial style of the WebSquare component.
setOpacity( value )
Sets the opacity in the WebSquare component. (Supported in all WebSquare components.)
setPosition( left , top , mode )
Sets the position (left, top) of the WebSquare component.
setReadOnly( readOnly )
Sets the readOnly proprety of the WebSquare component.
setSize( width , height )
Sets the size (width, height) of the WebSquare component.
setStyle( propertyName , value )
Sets the CSS of the WebSquare component.
setUserData( key , value )
Sets random data in the WebSquare component. (Supported in all WebSquare components.)
show( displayType )
Shows the WebSquare component on the page. (Supported in all WebSquare components.)
toggleClass( className )
Adds or removes a CSS class to or from a WebSquare component. (Supported in all WebSquare components.)
trigger( type , array )
Triggers the specified event in the WebSquare component.
unbind( type , function )
Removes the specified event from the WebSquare component.
visible( flag )
[deprecated]

Property Detail

class
Same as the class property in HTML.
The class defined in the CSS file or style block can be applied. Multiple classes can be defined with being divided by blank space.
WebSquare5 Engine applies different classes to different components. By defining a common class, the common class can be applied to multiple components.
cssRenderOrder
Changes the CSS file rendering order. [default: false, true]
When using the link tag in the document head, use stylesheet_ext.css file first.
dataList
Set the DataList to bind with the ScheduleCalendar. [default: ""]
Sets the ID of the DataList object.
Sets the idColumn and the startColumn. (Related Property) idColumn startColumn
(Required DataList column types) (Column IDs are changeable.) (1) "idCol" (2) "startCol" (3) "endCol" (4) "titleCol"
(Example) // ID of the DataList is dataList1. // Four kinds - "idCol", "startCol", "endCol", and "titleCol". (The column ID is changeable.) // Set as shown below. dataList = "dataList1" idColumn = "idCol" startColumn = "startCol" endColumn = "endCol" titleColumn = "titleCol"
defaultDate
Date to be set in the initially loaded component. [default: ""]
Must match with the ioFormat. (Related Property) ioFormat
defaultView
Schedule unit in the initial ScheduleCalendar. [default: month] (Options) "month" "basicWeek" "basicDay" "agendaWeek" "agendaDay"
editable
Changes the schedule. [default: false, true]
Sets the starting and the ending dates of a schedule through mouse dragging-n-dropping.
endColumn
Column ID in the DataList to use as the ending date of the schedule. [default: “”]
eventLimit
Limits the number of the events to be displayed. [default: true, false]
eventOrderColumn
Column ID in the DataList to use when sorting the schedules. [default: “”]
headerLeftBtn
[default:true, false] Displays three buttons ("<", ">", and "Today") on the upper-left corner. Displays previous month/week/day upon the end user’s clicking "&lt;" button. Displays next month/week/day upon the end user’s clicking ">" button. Displays the current month/week/day upon the end user’s clicking "Today" button.
(Options) "true" (Default) : Displays the buttons. "false" : HIdes the buttons.
headerRightBtn
Displays the schedule unit buttons (“Month”, “Week”, and “Day”) on the upper-right corner. [default:true, false] "Month" - Changes schedules on a monthly basis. "Week" - Changes schedules on a weekly basis. "Day" - Changes schedules on a daily basis.
(Options) "true" (Default) : Displays the buttons. "false" : HIdes the buttons.
headerTitle
Displays the center title of the header. [default: false, true]
id
Component ID
The component ID is allocated as a global object. The script can access each object through the component ID.
idColumn
Column ID in the DataList to use as the ID of the schedule. [default: “”]
includeScheduleEnd
Handles display of the last date of the schedule on the screen. This is due to the internal policy of the fullCalendar. [default:false, true]
Valid for yyyyMMdd format (Example: 20190720).
ioFormat
Sets the date format for start and end columns. [default: yyyyMMdd, MMddyyyy, ddMMyyyy]
lang
Langauge. [default:ko, en]
locale
Set the language to use in the ScheduleCalanedar of which version is 3.6 or higher. [default: ko, en]
In version 2.3, use the lang property.
nextDayThreshold
Reference time to render the schedule on the day in which the schedule ends. (HH:mm:ss) [Default: "09:00:00"]
Schedules that end after the reference time will be displayed on the date in which the schedule ends, and those that end before the reference time will not be displayed on the date in which the schedule ends.
Valid for yyyyMMddHHmmss format (Example: 20190720084500). (Example) nextDayThreshold="09:00:00" With the above setting, (1) The schedule that ends at 10:00 (after 09:00), the schedule will be displayed on the last schedule date in which the schedule ends. (2) The schedule that ends at 07:00 (before 09:00), the schedule will not be displayed on the last schedule date in which the schedule ends.
selectable
Allows selection of multiple dates. [default: false, true]
The end user can drag multiple dates and set them as period.
startColumn
Column ID in the DataList to use as the ending date of the schedule. [default: “”]
tabIndex
The focusing order of the component by the Tab key. [default: ""]
Same as the tabindex property in HTML.
themeColumn
Column ID in the DataList to set the theme of the schedule. [default: ""]
themeColumn must be in JSON format. The supported options include rendering, class, color, backgroundColor, borderColor, and textColor. 1. rendering: [ "" | "background" | "inverse-background" ] The method to render the schedule. (Default: "") class : Class to apply to the schedule (as an array or string). color : Color of the schedule (in the formats such as red, #FF0000, rgb(0,0,0,0)). Once the color is set, the backgroundColor and the borderColor will be also applied. backgroundColor : Background color. (Example: red, #ff0000, rgb(0, 0, 0, 0)) borderColor: Border color (Example: red, #ff0000, rgb(0, 0, 0, 0)) textColor: Text color (Example: red, #ff0000, rgb(0, 0, 0, 0))
(Example) dataList: data:dataList1, themeColumn: themeColumn themeColumn style is { "color":"yellow", "textColor":"#000000" }. Each schedule item will be displayed in black text on the yellow background bordered with yellow line.
timeFormat
Time format displayed on the schedule.
The default is for example “PM 2 o’clock 12 minutes”. (Example) (1) timeFormat="HH:mm" is to display as “14:12”. (HH : 24-hour format.) (2) timeFormat="hh" is to display as “02”. (hh : 12-hour format) For more info, visit https://fullcalendar.io/docs/v3/timeFormat.
titleColumn
Title of the schedule. [default: ""]
tooltipDisplay
Displays tooltip based on the user’s selection. [default: false, true] (Options) "true": Displays the tooltip. "false" (Default) : Not to display the tooltip.
version
Library version to be used in the ScheduleCalendar. [default: 2.3, 3.6] (Options) "2.3" (Default) : Loads fullCalendar 2.3.2. "3.6" : Loads 3.6.2.

Event Detail

onaddschedule
Triggered upon a schedule being added by addSchedule() method or selectable property setting.
The added schedule information is returned as JSON data.
Parameter
nametypedescription
rowIndex,JSONReturn the JSON data containing newObj. <Number> retObj.rowIndex : Row number containing the present schedule in the DataList bound. <Object> retObj.newObj : 바인드된 dataList에 추가된 스케줄 정보.
Sample
// Upon addition of the first schedule scwin.scheduleCalendar_onaddschedule = function(retObj) { console.log("Row number: " + retObj.rowIndex); // (Result) 0 console.log("Schedule Info: " + retObj.newObj); // (Result) Returns the JSON data of the rowIndex in the DataList bound. };
onclick
Triggered upon clicking of the date.
Clicking will return the focused date value.
Parameter
nametypedescription
retObjJSONReturns JSON containing start and end. <Object> retObj.start : 이벤트가 발생한 일정의 시작일. 형식은 date 객체. <Object> retObj.end : 이벤트가 발생한 일정의 종료일. 하나만 선택된 경우에는 선택된 다음 날짜가 지정됨.
Sample
scwin.scheduleCalendar_onclick = function(retObj) { console.log("start = [" + retObj.start + "], end = [" + WebSquare.date.getFormattedDate(retObj.end, "yyyy-MM-dd") + "]"); };
onmoveschedule
Triggered upon a schedule being moved or resized by mouse dragging-and-dropping.
Returns the JSON data containing previous schedule information before moving or resizing and the current schedule information.
Parameter
nametypedescription
rowIndex,JSONReturn the JSON data containing oldObj and newObj. <Number> retObj.rowIndex : Row number containing the present schedule in the DataList bound. <Object> retObj.oldObj : 이동 전의 스케줄 정보. <Object> retObj.newObj : 이동 후의 스케줄 정보.
Sample
// Upon addition of the first schedule scwin.scheduleCalendar_onaddschedule = function(retObj) { console.log("Row number: " + retObj.rowIndex); // (Result) 0 console.log("previous schedule information: " + retObj.oldObj); console.log("current schedule information: " + retObj.newObj); // (Result) Returns the previous schedule information before moving or resizing as well as the current schedule informaiton. };

Method Detail

addClass( className )
Adds a CSS class to the component. (Supported in all WebSquare components.)
Parameter
nametyperequireddescription
classNameStringYName of the class to add
Sample
// (Example) // Add oddClass to input1 component. input1.addClass("oddClass");
addSchedule( schedule )
Adds a schedule.
When bound with the dataList. An object for the DataList column ID can be created and sent as a parameter.
Parameter
nametyperequireddescription
scheduleObjectYSchedule to add
Sample
// When bound with the dataList(columnID : "colTitle", "colEnd", "colId", "colStart"), use the following script. scheduleCalendar1.addSchedule({"colTitle": "Additional Title 2222","colEnd": "20171222","colId": "ADD_id_223","colStart": "20171222"}); // If not bound with the dataList, use the following script. scheduleCalendar1.addSchedule({"title": "Additional Title 2222","end": "20171222","id": "ADD_id_223","start": "20171222"});
bind( eventType , function )
Dynamically allocate an event and the handler function to the component. (Supported in all WebSquare components.)
Parameter
nametyperequireddescription
eventTypeStringYEvent to allocate
functionFunctionYHandler function of the event
Sample
// (Example 1) // Define a function for the onclick event of input1. input1.bind("onclick", function(e){ alert(input1.getValue();})); // (Example 2) // Define commObj.ev_click function in advance. var commObj = {}; commObj.ev_click = function(e){ alert("click :: "+this.id); }; // Dynamically allocate onclick event and the handler function to input1 component. input1.bind("onclick", commObj.ev_click );
changeClass( oldClassName , newClassName )
Changes the class currently applied to the corresponding WebSquare component. (Supported in all WebSquare components.)
Only the classes added by addClass can be changed.
In order to remove classes directly defined in the class propert of the WebSquare component, add the following in config.xml. // Add the following in config.xml.
Parameter
nametyperequireddescription
oldClassNameStringYClass to change
newClassNameStringYClass to newly use
Sample
// The class is directly defined in the inputBox component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" class="tmpInputClass"></xf:input> // Add the following in config.xml. <style> <removeDefaultClass value="true" /> </style> // Change the class. // Change tmpInputClass class to tmpInputWarninClass. input1.changeClass("tmpInputClass","tmpInputWarninClass");
changeView( view )
Changes the view of the ScheduleCalendar.
Parameter
nametyperequireddescription
viewStringYType of the view to change.
month basicWeek basicDay agendaWeek agendaDay
Sample
// (Example) sheculeCalendar1.changeView("basicWeek");
focus( )
Focuses the WebSquare component. (Supported in all WebSquare components.)
getDataListInfo( )
Returns the dataList bound with the component.
Return
typedescription
ObjectReturns nodeset, label, and value id as an object.
Sample
// Example scheduleCalendar1.getDataListInfo();
getDisabled( )
Returns the current value of the disabled property. (Supported in all WebSquare components.)
Return
typedescription
BooleanValue of the disabled property
Sample
// (Example) Check the current value of the disabled property. var returnValue = componentId.getDisabled(); // (Return Example) false
getGenerator( )
In case generated by the Generator component, returns the parent Generator object that created the component itself. (Supported in all WebSquare components.)
Return
typedescription
ObjectParent Generator object
Sample
// (Example) The Generator (parent) create a Trigger (child). <w2:generator id="generator1"> <w2:trigger id="trigger1" ev:onclick="scwin.trigger1_onclick"></w2:trigger></w2:generator> // In the example below, upon the end user’s clicking the Trigger 1, the generator1 object will be displayed on the console. scwin.trigger1.onclick = function(){ console.log(this.getGenerator());}
getID( )
Returns the ID of the WebSquare component. (Supported in all WebSquare components.)
Return
typedescription
StringWebSquare component ID
Sample
// Upon dynamically receiving a WebSquare component, the ID can be checked as shown below. function fn_validCheck(tmpObj){ var compID = tmpObj.getID(); } // If the tmpObj in the above example has "input1" ID. // (Return) "input1"
getInitStyle( CSS )
Returns the initial style of the WebSquare component. (Supported in all WebSquare components.)
Parameter
nametyperequireddescription
CSSStringNProperty (If not specified, all properties will be displayed.)
getOpacity( )
Returns the opacity of the WebSquare component. (Supported in all WebSquare components.)
The Engine returns the opacity value of the CSS.
Return
typedescription
IntegerOpacity
Sample
// Apply the opacity CSS to the InputBox component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;opacity:0.2;"></xf:input> // Return the opacity of the InputBox. var returnValue = input1.getOpacity(); // A real number between 0 and 1 will be returned. // (Return) "0.2"
getOriginalID( )
Returns the originalID of the WebSquare component. (Supported in all WebSquare components.)
The originalID is valid when the scope function is in use.
For scope="true" WFrame, component IDs inside the WFrame is changed with the prefix(wframeID + "_") being added before the ID given by the user (originalID).
The originalID means the ID before the prefix being added.
Return
typedescription
StringoriginalID of the component
Sample
// An example of multi-WFrame page // Main page with a WFrame (main.xml) <w2:wframe id="wframe1" src="text.xml" scope="true"/> // Source page to be contained in the WFrame (text.xml) <w2:textbox id="textbox1"/> // (Example) Check the Id and the original ID in the script of text.xml // Run getID. textbox1.getID(); // "wframe1_textbox1" is returned. // Run getOriginalID. textbox1.getOriginalID(); // "textbox1" is returned.
getPluginName( )
Returns the name of the WebSquare component. (Supported in all WebSquare components.)
Return
typedescription
StringName of the WebSquare component (pluginName)
Sample
// When a common function dynamically receives a WebSQuare object as shown below, different actions can be made for each component type. var commObj = {}; commObj.fn_makeReqData = function(tmpObj){ var tmpID = tmpObj.getID(); // Component ID var tmpCompType = tmpObj.getPluginName(); // Component name if(tmpCompType == "input"){ //..Logic.. }else if(tmpCompType == "gridView"){ //..Logic .. }else{ //..Logic.. } };
getPosition( positionName )
Returns the position (left and top) of the WebSquare component. (Supported in all WebSquare components.)
When the position is set in 0%, the value will be converted into %.
Parameter
nametyperequireddescription
positionNameStringY[left, top] Position type
Return
typedescription
NumberPosition of the component
Sample
// CSS margin is applied to the Input component as shown below. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;margin:10px;"></xf:input> // (Example) Check the top value of the InputBox. var returnValue = input1.getPosition("top"); // Position value in pixels will be returned. // (Return) 10
getReadOnly( )
Returns the current value of the readOnly property. (Supported in all WebSquare components.)
Return
typedescription
BooleanThe current setting of the readOnly property
Sample
// Example to check the readOnly setting of the component. var returnValue = componentId.getReadOnly(); // (Return Example) false
getScheduleInfo( id )
Returns the schedule information.
Parameter
nametyperequireddescription
idStringYSchedule ID
Return
typedescription
Object:YEvent schedule (Object containing id, title, start, and end data)
getScope( )
For the child component of a scope="true" WFrame, returns the parent WFrame object. (Supported in all WebSquare components.)
For scope="true" WFrame, null will be returned.
Return
typedescription
ObjectWFrame object or null
Sample
// (Example) // The main page has wframe1 which contains wframe1 which also contains wframe11. // The source page of wframe11 has textbox1. textbox1.getScope(); // (Return Example) wframe11 object
getScopeWindow( )
For the child component of a scope="true" WFrame, returns the parent WFrame object. (Supported in all WebSquare components.)
If not a child of a scope="true" WFrame, a global window object will be returned.
Return
typedescription
ObjectScope object of the WFrame or a global window object
Sample
// (Example) // The main page has wframe1 which contains wframe1 which also contains wframe11. // The source page of wframe11 has textbox1. var scope = textbox1.getScopeWindow(); scope.wframe11 === textbox1.getScope(); // true
getSize( sizeName )
Sets the size (width and height) of the WebSquare component. (Supported in all WebSquare components.)
If set in %, values will be converted into pixels.
Parameter
nametyperequireddescription
sizeNameStringYSize types. For calculation of each size type, see the below:
height : element.clientHeight innerHeight : element.clientHeight + padding outerHeight : element.clientHeight + padding + border outerMarginHeight : element.clientHeight + padding + border + margin width : element.clientWidth innerWidth : element.clientWidth + padding outerWidth : element.clientWidth + padding + border outerMarginWidth : element.clientWidth + padding + border + margin
Return
typedescription
NumberSize of the component
Sample
var returnValue = componentId.getSize("width"); // (Return Example) 100 // Values are in pixels. // If set in %, values will be converted into pixels.
getStyle( propertyName )
Returns the CSS setting of the WebSquare component. (Supported in all WebSquare components.)
Parameter
nametyperequireddescription
propertyNameStringYCSS property to return
Return
typedescription
StringCSS value
Sample
// Define an Input component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;"></xf:input> // (Example) Check the width of the InputBox above. var returnValue = input1.getStyle("width"); // (Return) "144px"
getStyleValue( style )
[deprecated]
Use getStyle instead.
Returns the current CSS applied to the WebSquare component.
Parameter
nametyperequireddescription
styleStringYCSS property to return
Return
typedescription
StringCSS value (Colors are returned in HexCode.)
getTitle( )
Returns the title of the WebSquare component. (Supported in all WebSquare components.)
Return
typedescription
StringTitle
Sample
// In the following example, the Title is “Input Name”. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" title="이름 입력"></xf:input> var tmpTitle = input1.getTitle(); // (Return Example) “Enter your name.”
getUdcHome( )
Returns the path of the UDC file including the file name in which the UDC object is defined. (Supported in all WebSquare components.)
The file name includes .xml. In order to get the file path without .xml, use getUdcRoot.
When called by a WebSquare component, not a UDC object, “undefined” will be returned.
Return
typedescription
StringUDC file path (For others than the UDC, undefined will be returned.)
Sample
// Example // UDC file path is /a/b/udc.xml. // Page XML is /a/c/main.xml. // UDC ID is udc1. udc1.getUdcHome(); // (Result) /a/b/udc.xml
getUdcRoot( )
Returns the path of the UDC file in which the UDC object is defined. (Supported in all WebSquare components.)
Not contains the file name. In order to get a path including the file name, use getUdcHome.
When called by a WebSquare component, not a UDC object, “undefined” will be returned.
Return
typedescription
StringUDC file path (For others than the UDC, undefined will be returned.)
Sample
// Example // UDC file path is /a/b/udc.xml. // Page XML is /a/c/main.xml. // UDC ID is udc1. udc1.getUdcHome(); // (Execution Result) /a/b/
getUserData( key )
Returns the value set by setUserData or directly defined by the user in the XML file. (Supported in all WebSquare components.)
Parameter
nametyperequireddescription
keyStringYData key
Return
typedescription
StringValue for the given key
Sample
// (Example) Setting the user property (setTest) in the InputBox <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" setTest="Hello"></xf:input> // Returns the value of the setTest property. input1.getUserData("setTest"); // (Return) "Hello" // Set 'valueTest' (key) and 'WebSquare' (data) through setUserData. input1.setUserData("valueTest","WebSquare"); // Returns the value of the setTest property. input1.getUserData("WebSquare"); // (Return) "WebSquare"
getView( )
Gets the current view of the ScheduleCalendar.
Sample
sheculeCalendar1.getView(); // { name: "", title: "", intervalStart: "", intervalEnd: "" }
gotoCalendar( dateStr )
Goes to the specified date.
Parameter
nametyperequireddescription
dateStrStringYDate to go to
Sample
// (Example) schedule1.gotoCalendar("20171013");
hasClass( className )
Checks whether the WebSquare component has a certain class. (Supported in all WebSQuare components.)
Parameter
nametyperequireddescription
classNameStringYName of the class to check
Return
typedescription
BooleanWhether the class exists or not
Sample
// The class is directly defined in the inputBox component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" class="tmpInputClass"></xf:input> var returnValue = input1.hasClass("tmpInputClass"); // (Return) true
hide( )
Hides the WebSquare component. (Supported in all WebSquare components.)
display:none; or visibility:hidden; CSS is applied.
Sample
// (Example) Hide the component. componentId.hide();
removeClass( className )
Removes a class from the WebSquare component. (Supported in all WebSquare components.)
Only the classes added by addClass can be removed.
In order to remove classes directly defined as a property of the component, add the following in config.xml. // Add the following in config.xml. <style><removeDefaultClass value="true" /></style>
Parameter
nametyperequireddescription
classNameStringYName of the class to remove
Sample
// If the class is directly defined as an InputBox property. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" class="tmpInputClass"></xf:input> // In the config.xml file, add the following. <style> <removeDefaultClass value="true" /> </style> // Classes can be removed by removeClass. input1.removeClass("tmpInputClass");
removeschedule( id )
Removes the schedule.
If ID column is not found in the DataCollection, the title will be used instead of the ID.
Parameter
nametyperequireddescription
idStringYSchedule ID
setDayNameStyle( options )
Define the style to apply to the day column of the calendar.
Parameter
nametyperequireddescription
optionsObjectYStyle
<String:Y> options.header Header style <String:Y> options.body Body style
Sample
var options = { sun : { header : { "color":"#ff0000" }, body : { background : { "background-color":"#ff0000","opacity":"0.2" }, num: { "color" : "#0000ff" } } } }; scheduleCalendar1.setDayNameStyle(options);
setDisabled( disabled )
Sets the disabled property of the WebSquare component. (Supported in all WebSquare components.)
Parameter
nametyperequireddescription
disabledBooleanYDisabled status
true: Disabled. false: Not disabled.
Sample
// Sets the disabled property in the component. componentId.setDisabled(true);
setEventPause( evList , flag )
Pauses the event. (Supported in all WebSquare components.)
Parameter
nametyperequireddescription
evListStringNList of the events to pause. (in case of null, all events of the corresponding WebSquare component is paused or restarted.)
flagBooleanYWhether to pause the event or not.
true: Pause. false: Not pause.
Sample
// (Example 1) // Pause the onclick event. input1.setEventPause("onclick", true); // (Example 2) // Restart the onfocus and the onblur events. input1.setEventPause("onfocus,onblur", false); // (Example 3) // Pause all events registered in input1. input1.setEventPause(null, true);
setHeaderBtn( Options )
Sets the buttons on the upper-right and the upper-left corners and the title.
Parameter
nametyperequireddescription
OptionsObjectYHeader button setting
<Boolean:N> option.headerLeftBtn Left buttons on the header (true/false) <Boolean:N> options.headerRightBtn Right buttons on the header (true/false) <Boolean:N> options.headerTitle Header title of the calendar (true/false)
Sample
scheduleCalendar1.setHeaderBtn({headerLeftBtn:false,headerRightBtn:false,headerTitle:false});
setInitStyle( property )
Restores the initial style of the WebSquare component. (Supported in all WebSquare components.)
Parameter
nametyperequireddescription
propertyStringNCSS property (If not spcified, all properties will be restored.)
Sample
// (Example) group1.setInitStyle();
setOpacity( value )
Sets the opacity in the WebSquare component. (Supported in all WebSquare components.)
The engine sets the opacity property (of CSS).
Parameter
nametyperequireddescription
valueNumberYOpacity (Real number between 0 and 1)
Sample
// (Example) Set the opacity as 0.45. componentId.setOpacity(0.45);
setPosition( left , top , mode )
Sets the position (left, top) of the WebSquare component. (Supported in all WebSquare components.)
Parameter
nametyperequireddescription
leftNumberYLeft position value or null
topNumberYTop position value or null
modeStringNPosition setting method. [default: absolute, delta]
absolute: The inputted value becomes the position. delta: The inputted value is added to the current position.
Sample
// (Example) Set the top position as 100px. componentId.setPosition(null, 100);
setReadOnly( readOnly )
Sets the readOnly proprety of the WebSquare component. (Supported in all WebSquare components.)
Parameter
nametyperequireddescription
readOnlyBooleanYSetting of the readOnly property. (“true”: Used. “false”: Not used.)
Sample
// Set the readOnly property as true. componentId.setReadOnly(true);
setSize( width , height )
Sets the size (width, height) of the WebSquare component. (Supported in all WebSquare components.)
Parameter
nametyperequireddescription
widthNumberYWidth of the component or null.
heightNumberYHeight of the component or null.
Sample
// (Example) Set the height of the component as 100px. componentId.setSize(null,100);
setStyle( propertyName , value )
Sets the CSS of the WebSquare component. (Supported in all WebSquare components.)
Parameter
nametyperequireddescription
propertyNameStringYCSS property to set.
valueStringYValue to set as the specified CSS property
Sample
// (Example 1) Set the width as 200px. componentId.setStyle("width", "200px"); // (Example 2) Set the background as olive. componentId.setStyle("background-color","olive");
setUserData( key , value )
Sets random data in the WebSquare component. (Supported in all WebSquare components.)
Enter key values supported by the component. In case a key value not supported by the component is entered, corresponding logs will be displayed.
Parameter
nametyperequireddescription
keyStringYData key to set
valueStringYDefined data value
Sample
// Set 'data' key and 'WebSquare' value in the component. componentId.setUserData("data", "WebSquare"); // The key must be supported in the component. componentId.setUserData("title", "WebSquare"); // Following logs will be displayed. // !!!WARNING - [title] can't be defined as UserData.
show( displayType )
Shows the WebSquare component on the page. (Supported in all WebSquare components.)
Sets the display property as specified and applies "visibility: show;" CSS.
Parameter
nametyperequireddescription
displayTypeStringNCSS display setting to apply.
block : Uses “display: block;”. (Default) inline : display: inline; none : display: none; "" : Restores to the previous display setting.
Sample
// (Example) display: block; componentId.show(); // (Example) Restore the previous display setting. componentId.show("");
toggleClass( className )
Adds or removes a CSS class to or from a WebSquare component. (Supported in all WebSquare components.)
Removes the class from the WebSquare component.
If the WebSquare component does not have the specified class, adds the class.
Only the classes added by addClass can be removed.
In order to remove classes directly defined as a property of the component, add the following in config.xml. // Add the following in config.xml. <style><removeDefaultClass value="true" /></style>
Parameter
nametyperequireddescription
classNameStringYClass to add or remove
Sample
// The class is directly defined in the inputBox component. <xf:input id="input1" style="position: relative;width: 144px;height: 21px;" class="tmpInputClass"></xf:input> // Add the following in config.xml. <style> <removeDefaultClass value="true" /> </style> // Remove tmpInputClass class. input1.toggleClass("tmpInputClass"); // Add the (previously removed) tmpInputClass. input1.toggleClass("tmpInputClass");
trigger( type , array )
Triggers a certain event in the component. (Supported in all WebSquare components.)
Parameter
nametyperequireddescription
typeStringYEvent to trigger
arrayArrayNArray of parameters to send to the event handler
Sample
// (Example 1) // Trigger the onclick event in input1 component. input1.trigger("onclick"); // (Example 2) // Trigger the onviewchange event in input1, and send (1, 2) parameter to the handler function. input1.trigger("onviewchange", [1,2]);
unbind( type , function )
Removes the event from the component. (Supported in all WebSquare component.)
Parameter
nametyperequireddescription
typeStringNEvent to remove. (If not specified, all events of the component will be removed.)
functionFunctionNHandler function of the event to remove. (If not specified, all handler functions of the event will be removed.)
Sample
// (Example 1) // Remove all events registered in the input1 component. input1.unbind(); // (Example 2) // Remove all handler functions for the onviewchange event of the input1 component. input1.unbind("onviewchange"); // (Example 3) // Remove func1 for the onviewchange event of the input1 component. input1.unbind("onviewchange", func1);
visible( flag )
[deprecated]
Use show/hide or setStyle instead.
The Engine sets the CSS visibility property.
Parameter
nametyperequireddescription
flagBooleanYCSS visibility setting
true : visibility: visible; false : visibility: hidden;