source: admin-center/trunk/fuentes/admin-center.install/usr/share/admin-center/lib/bower_components/eonasdan-bootstrap-datetimepicker/docs/Events.md @ 6782

Last change on this file since 6782 was 6782, checked in by kbut, 20 months ago

add moment and datetimepicker bootstrap plugin

File size: 1.6 KB
Line 
1## Events
2
3### dp.hide
4
5Fired when the widget is hidden.
6
7Parameters:
8
9```
10e = {
11    date //the currently set date. Type: moment object (clone)
12}
13```
14
15Emitted from:
16
17* toggle()
18* hide()
19* disable()
20
21----------------------
22
23### dp.show
24
25Fired when the widget is shown.
26
27Parameters:
28
29No parameters are include, listen to `dp.change` instead
30
31Emitted from:
32
33* toggle()
34* show()
35
36----------------------
37
38### dp.change
39
40Fired when the date is changed, including when changed to a non-date (e.g. When keepInvalid=true).
41
42Parameters:
43
44```
45e = {
46    date, //date the picker changed to. Type: moment object (clone)
47    oldDate //previous date. Type: moment object (clone) or false in the event of a null
48}
49```
50
51Emitted from:
52
53* toggle() **Note**: Only fired when using `useCurrent`
54* show() **Note**: Only fired when using `useCurrent` or when or the date is changed to comply with date rules (min/max etc)
55* date(newDate)
56* minDate(minDate)
57* maxDate(maxDate)
58* daysOfWeekDisabled()
59
60----------------------
61
62### dp.error
63
64Fired when a selected date fails to pass validation.
65
66Parameters:
67
68```
69e = {
70    date //the invalid date. Type: moment object (clone)
71    oldDate //previous date. Type: moment object (clone) or false in the event of a null
72}
73```
74
75Emmited from:
76
77* minDate(minDate)
78* maxDate(maxDate)
79* daysOfWeekDisabled()
80* setValue() *private function*
81
82----------------------
83
84### dp.update
85
86<small>4.14.30</small>
87
88Fired (in most cases) when the `viewDate` changes. E.g. Next and Previous buttons, selecting a year.
89
90Parameters:
91
92```
93e = {
94   change, //Change type as a momentjs format token. Type: string e.g. yyyy on year change
95   viewDate //new viewDate. Type: moment object
96}
97```
Note: See TracBrowser for help on using the repository browser.