Search results

Static Functions API in JavaScript (ES5) Schedule API control

Root static functions of Schedule Component

addDays

Method to add no of days in date object

Parameter Type Description
date Date Accepts the date object
noOfDays number Accepts the number of days count

Returns Date

addMonths

Method to add no of months in date object

Parameter Type Description
date Date Accepts the date object
noOfMonths number Accepts the number of month count

Returns Date

addYears

Method to add no of years in date object

Parameter Type Description
date Date Accepts the date object
noOfYears number Accepts the number of month count

Returns Date

capitalizeFirstWord

Method to capitalize the first word in string

Parameter Type Description
inputString string Accepts the string value
type string Accepts the string type

Returns string

findIndexInData

Method to find the index from data collection

Parameter Type Description
data Record[] Accepts the data as object
field string Accepts the field name
value string Accepts the value name
event (optional) Record Accepts the data as object
resourceCollection (optional) Record[] Accepts the data collections

Returns number

firstDateOfMonth

Method to get first date of month

Parameter Type Description
date Date Accepts the date object

Returns Date

getDateCount

Method to get date count between two dates

Parameter Type Description
startDate Date Accepts the date object
endDate Date Accepts the date object

Returns number

getDateFromString

Method to get date object from date string

Parameter Type Description
date string Accepts the date string

Returns Date

getDateInMs

Method to get milliseconds from date object

Parameter Type Description
date Date Accepts the date object

Returns number

getDaysCount

Method to get days count between two dates

Parameter Type Description
startDate number Accepts the date object
endDate number Accepts the date object

Returns number

getElementHeight

Method to get element cell Height

Parameter Type Description
element HTMLElement Accepts the DOM element

Returns number

getElementHeightFromClass

Method to get height from element

Parameter Type Description
container Element Accepts the DOM element
elementClass string Accepts the element class

Returns number

getElementTop

Method to get element cell Top

Parameter Type Description
element HTMLElement Accepts the DOM element

Returns number

getElementWidth

Method to get element cell width

Parameter Type Description
element HTMLElement Accepts the DOM element

Returns number

getElementWidthFromClass

Method to get width from element

Parameter Type Description
container Element Accepts the DOM element
elementClass string Accepts the element class

Returns number

getMaxDays

Method to get month last date

Parameter Type Description
date Date Accepts the date object

Returns number

getOuterHeight

Method to get element outer height

Parameter Type Description
element HTMLElement Accepts the DOM element

Returns number

getStartEndHours

Method to get start and end hours

Parameter Type Description
date Date Accepts the date object
startHour Date Accepts the start hour date object
endHour Date Accepts the end hour date object

Returns Record

getTranslateX

Method to get translateX value

Parameter Type Description
element HTMLElement | Element Accepts the DOM element

Returns number

getTranslateY

Method to get translateY value

Parameter Type Description
element HTMLElement | Element Accepts the DOM element

Returns number

getUniversalTime

Method to get UTC time value from date

Parameter Type Description
date Date Accepts the date

Returns number

getWeekFirstDate

Method to get week first date

Parameter Type Description
date Date Accepts the date object
firstDayOfWeek number Accepts the first day of week number

Returns Date

getWeekLastDate

Method to get week last date

Parameter Type Description
date Date Accepts the date object
firstDayOfWeek number Accepts the first day of week number

Returns Date

getWeekMiddleDate

Method to get week middle date

Parameter Type Description
weekFirst Date Accepts the week first date object
weekLast Date Accepts the week last date object

Returns Date

getWeekNumber

Method to get week number

Parameter Type Description
date Date Accepts the date object

Returns number

isDaylightSavingTime

Method to check DST is present or not in date object

Parameter Type Description
date Date Accepts the date object

Returns boolean

isIPadDevice

Method to check the IPad device

Returns boolean

isMobile

Method to check the device

Returns boolean

lastDateOfMonth

Method to get last date of month

Parameter Type Description
date Date Accepts the date object

Returns Date

removeChildren

Method to remove child elements

Parameter Type Description
element HTMLElement | Element Accepts the DOM element

Returns void

resetTime

Method the reset hours in date object

Parameter Type Description
date Date Accepts the date object

Returns Date

setTime

Method to set time to date object

Parameter Type Description
date Date Accepts the date object
time number Accepts the milliseconds

Returns Date