Global

Members

# constant currentDate

Store current date - contains day, month and year attributes

View Source utils/date.js, line 14

# constant currentTime

Store current time - contains hour and minute attributes

View Source utils/date.js, line 23

# constant datePattern

Input pattern array

View Source utils/date.js, line 31

# constant datePlaceholder

Input placeholder array

View Source utils/date.js, line 41

# constant getLimitYear

provides the start and end years of the select

View Source utils/date.js, line 48

# constant months

Provide month informations. Contains name (month names array) and getLength (function) attributes

View Source utils/date.js, line 54

# constant theme

Contains navigator theme

View Source style/index.js, line 14

Example
"return light"

# constant transformToNumber

Convert a digit to a number

View Source utils/date.js, line 8

Methods

# deleteSelectedDay()

iterates over elements with class selected-day and removes it

View Source component/calendar/index.jsx, line 21

# getCalendarOption(item, baseId) → {object}

Provides span option for CalendarBox list

Parameters:
Name Type Description
item object
baseId string

date picker input id

View Source component/calendar/CalendarSelect.jsx, line 13

span html element

object

# getErrors(inputId)

Retrieves, in validation object, errors corresponding to id passed in parameter and adds them to error state

Parameters:
Name Type Description
inputId string

input id

See:

View Source features/error.js, line 11

# getIsDefaultObject(isDate, isDateTime, isPeriod, isTime) → {object}

Provides object to define "is" attribute

Parameters:
Name Type Description
isDate boolean
isDateTime boolean
isPeriod boolean
isTime boolean

View Source utils/datePickerParams.js, line 13

object

# getNumberDay(currentDay, monthLength, startDay) → {number}

Checks that the current day, passed as a parameter, is included in the number of days of the month. Otherwise fix it

Parameters:
Name Type Description
currentDay number
monthLength number
startDay number

View Source component/calendar/index.jsx, line 31

dayNumber

number

# getSelectItemId(name) → {string}

Provide the id of the html select tag

Parameters:
Name Type Description
name string

View Source component/calendar/CalendarSelect.jsx, line 59

string

# getSpan(textContent, id, isSelected, spanOnClickFunction) → {object}

Provides span option for Calendar Select list

Parameters:
Name Type Default Description
textContent string | number
id string
isSelected boolean false
spanOnClickFunction function false

View Source component/calendar/CalendarSelect.jsx, line 35

span html element

object

# getSpanValue(value, maxValue, minValue) → {number}

Corrects the value passed in parameter if it does not respect the minimum and maximum values

Parameters:
Name Type Description
value number
maxValue number
minValue number

View Source component/calendar/CalendarSelect.jsx, line 48

number

# moveDateSelectList(moreOrLess, id, list, maxValue, minValue)

Scrolls through list values - onClick

Parameters:
Name Type Default Description
moreOrLess string

if receive "more" increment the value of the list else do a decrement

id string
list array
maxValue number
minValue number 0

View Source component/calendar/CalendarSelect.jsx, line 78

# onWheelFunction(e, id, list, maxValue, minValue)

Scrolls through list values - onWheel

Parameters:
Name Type Default Description
e object

event

id string
list array
maxValue number
minValue number 0

View Source component/calendar/CalendarSelect.jsx, line 94

# setInitialDateState(draft, id, type)

Parameters:
Name Type Description
draft object
id string
type string

accept date, datePeriod, dateTime, dateTimePeriod, time, timePeriod

View Source features/selectedDate.js, line 13

# updateDateSelectList(id, list, maxValue, minValue, startValue)

modify span value of CalendarSelect

Parameters:
Name Type Description
id string
list array
maxValue number
minValue number
startValue number

View Source component/calendar/CalendarSelect.jsx, line 112

Type Definitions

object

# datePickerParams

Store necessary informations and functions to execute DatePicker component

Properties:
Name Type Description
id object

Store id

is object

Store "is" object. Contains date, dateTime, period and time attributes.

deadlines object

Store deadlines applied to the DatePicker component

addId function

Add ids to "id" attribute

eventFunction object

Stores functions to be executed when events are triggered

format object

Store format of input and output values

getTimeSelectId function

Provide time select id

htmlClass object

Stores html class provided as a parameter of DatePicker component. Use to define className

label object

Store input label provided as a parameter of DatePicker component. Use to define label text

initComponentParams function

Initializes the attributes containing the component parameters

initIdHtml function

Initializes the html ids necessary to component operations

listen function

Execute the functions corresponding to the eventName parameter

setEventFunction function

Check and store the event functions passed as a parameter of the DatePicker component

setHtmlClass function

Check and store html class passed as a parameter of the DatePicker component

setInputId function

Check and store the input id passed as a parameter of the DatePicker component

setLabel function

Check and store the input label passed as a parameter of the DatePicker component

View Source utils/datePickerParams.js, line 16

Examples
`datePickerParams.is = { date: true, dateTime: false, period: true, time: false }`
`datePickerParams.deadlines = { max: 2022-02-24, min: 2022-01-01 }` 
object

# style

Provides the color, the background-color and the calendar icons corresponding to the theme

Properties:
Name Type Description
adviceColor function

Provides advice message font color

backgroundColor function

Provides background color

color function

Provides font color

colors object

Store advice, dark, error, light and defaults fonts colors

errorColor function

Provides error message font color

icons object

Store icons

page object

Store page font and background colors

setColors function

Set font colors : dark and light theme, advice and error message

View Source style/index.js, line 16

object

# validation

Provides input and parameter check methods

Properties:
Name Type Description
error array

Stores errors in array

addError function

Add an error object to error attribute

allowedLength object

Provides allowed lengths. Contains dateInput, id, label attributes. These attributes contain an object having the min and max attributes.

allowedType object

Provides allowed type (return of typeof). Contains eventFuntion attribute

checkColor function

Checks that the color passed in parameter corresponds to the accepted format

checkFormat function

Checks that the requested format matches the accepted format

checkId function

Checks that id passed in parameter corresponds to the accepted format

checkInputValue function

Checks that input value passed in parameter corresponds to the accepted format

checkLabel function

Checks that label passed in parameter corresponds to the accepted format

checkLimits function

Checks that deadlines passed in parameter corresponds to the accepted format

checkString function

Checks length and format of string parameter

checkType function

Checks if type is allowed

clearError function

clear error attribute and error message displayed

formats object

Provides format control functions and information

regExpTest function

Apply RegExp test function

View Source utils/validation.js, line 4