0.0.13 • Published 6 years ago

zerbus v0.0.13

Weekly downloads
2
License
MIT
Repository
-
Last release
6 years ago

Zerbus WebComponents Components

Collection of WebComponents

Import

Import the package in your head tag :

<script src='https://unpkg.com/zerbus@0.0.8/dist/zerbus.js'></script>

Usage

Zerbus datepicker

Add the datepicker anywhere :

<zerbus-datepicker></zerbus-datepicker>

Then display the datepicker by calling its show() method.

Input properties

NameTypeDefaultDescription
enableBackdropDismissbooleantrueEnable to dismiss the datepicker of the user click outside
minDateMomentnullMinimum date, before which all dates are disabled
maxDateMomentnullMaximum date, before which all dates are disabled
disabledDatesMoment[][]Specific disabled dates
customClasses{date: Moment, class: string}[][]Class to apply for specific dates cell
customStyles{date: Moment, style: any}[][]Css style to apply for specific dates cell
languagestringenMoment.js name of the language to use
positionOffset{x: number, y: number}{x: 30, y: 0}The datepicker try to display on the better place in the window, if default value is not perfect, use this prop to adapt it

Events

NameTypedescription
onSelected{date: Moment, event: MouseEvent}Fired when the user click on an enabled date
onHover{date: Moment, event: MouseEvent}Fired when a cell is hover
onLeave{date: Moment, event: MouseEvent}Fired when a cell is leaved
onFocusChangedMomentFired when the user select an other month

Methods

MethodArgumentsReturn typeDescription
shownullvoidDisplay the datepicker
dismissnullvoidDismiss the datepicker
setLocalestringvoidChange the Moment.js language
0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago