Blame view

vendor/bower/bootstrap-datepicker/docs/events.rst 1.3 KB
021728bd   Administrator   Importers CRUD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
  Events
  ======
  
  Datepicker triggers a number of events in certain circumstances.  All events have extra data attached to the event object that is passed to any event handlers::
  
      $('.datepicker').datepicker()
          .on(picker_event, function(e){
              # `e` here contains the extra attributes
          });
  
  * ``date``: the relevant Date object, in local timezone.  For a multidate picker, this will be the latest date picked.
  * ``dates``: an Array of Date objects, in local timezone, when using a multidate picker.
  * ``format([ix], [format])``: a function to make formatting ``date`` easier.  ``ix`` can be the index of a Date in the ``dates`` array to format; if absent, the last date selected will be used.  ``format`` can be any format string that datepicker supports; if absent, the format set on the datepicker will be used.  Both arguments are optional.
  
  
  show
  ----
  
  Fired when the date picker is displayed.
  
  
  hide
  ----
  
  Fired when the date picker is hidden.
  
  
  clearDate
  ---------
  
  Fired when the date is cleared, normally when the "clear" button (enabled with the ``clearBtn`` option) is pressed.
  
  
  changeDate
  ----------
  
  Fired when the date is changed.
  
  
  changeYear
  ----------
  
  Fired when the *view* year is changed from decade view.
  
  changeMonth
  -----------
  
  Fired when the *view* month is changed from year view.