source: admin-center/trunk/fuentes/admin-center.install/usr/share/admin-center/lib/bower_components/eonasdan-bootstrap-datetimepicker/docs/Options.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: 25.0 KB
Line 
1## Options
2
3<div class="alert alert-info">
4    <strong>Note</strong>
5    All options are accessed via the <code>data</code> attribute e.g. <code>$('#datetimepicker').data("DateTimePicker").OPTION()</code>
6</div>
7
8### options()
9
10Returns the components current options object. Note that the changing the values of the returned object does not change the components actual configuration. Use `options(options)` to set the components options massively or the other methods for setting config options individually.
11
12
13### options([options])
14
15Takes an object variable with option key:value properties and configures the component. Use this to update multiple options on the component.
16
17----------------------
18
19### date
20
21 Returns the component's model current date, a `moment` object or `null` if not set.
22
23####date([newDate])
24
25 Takes `string, Date, moment, null` parameter and sets the components model current moment to it. Passing a `null` value unsets the components model current moment. Parsing of the newDate parameter is made using moment library with the `options.format` and `options.useStrict` components configuration.
26
27##### Throws
28
29* `TypeError` - in case the `newDate` cannot be parsed
30
31##### Emits
32
33* `dp.change` - In case `newDate` is different from current moment
34
35----------------------
36
37### format
38
39        Default: false
40
41See [momentjs' docs](http://momentjs.com/docs/#/displaying/format/) for valid formats. Format also dictates what components are shown, e.g. `MM/dd/YYYY` will not display the time picker.
42
43#### format()
44
45Returns the component's `options.format` `string`
46
47#### format(format)
48
49Takes a [moment.js](http://momentjs.com/docs/#/displaying/format/) format `string` and sets the components  `options.format`. This is used for displaying and also for parsing input strings either from the input element the component is attached to or the `date()` function.
50The parameter can also be a `boolean:false` in which case the format is set to the locale's `L LT`.
51
52**Note:** this is also used to determine if the TimePicker sub component will display the hours in 12 or 24 format. (if 'a' or 'h' exists in the passed `string` then a 12 hour mode is set)
53
54----------------------
55
56### dayViewHeaderFormat
57
58        Default: 'MMMM YYYY'
59
60Changes the heading of the datepicker when in "days" view.
61
62![Datepicker Header](img/dpheader.png)
63
64#### dayViewHeaderFormat()
65
66Returns a `string` variable with the currently set `options.dayViewHeaderFormat` option.
67
68#### dayViewHeaderFormat(string)
69
70Takes a `string` value.
71
72Used to customize the header of the day view.
73
74----------------------
75
76### extraFormats
77
78        Default: false
79
80Allows for several input formats to be valid. See [this PR](https://github.com/Eonasdan/bootstrap-datetimepicker/pull/666).
81
82#### extraFormats()
83
84Returns a `boolean` or array with the `options.extraFormats` option configuration
85
86#### extraFormats(formats)
87
88Takes an array of valid input moment format options.
89
90----------------------
91
92
93### stepping
94
95        Default: 1
96
97Number of minutes the up/down arrow's will move the minutes value in the time picker
98
99#### stepping()
100
101Returns a `number` with the `options.stepping` option configuration
102
103
104#### stepping(number)
105
106Takes a `number`. This be the amount the up/down arrows move the minute value with a time picker.
107
108----------------------
109
110
111### min/maxDate
112
113        Default: false
114    Accepts: date, moment, string
115
116Prevents date/time selections before this date. Will override `defaultDate` and `useCurrent` if either of these settings are the same day since both options are invalid according to the rules you've selected.
117
118#### minDate()
119
120Returns the currently set moment of the `options.minDate` or `false` if not set
121
122#### minDate(minDate)
123
124Takes a minDate `string, Date, moment, boolean:false` parameter and disallows the user to select a moment that is before that moment. If a `boolean:false` value is passed the `options.minDate` parameter is cleared and there is no restriction to the miminum moment the user can select.
125
126**Note:** If the minDate parameter is after the currently selected moment the currently selected moment changes to minDate parameter
127
128##### Throws
129
130* `TypeError` - if minDate parameter cannot be parsed using the `options.format` and `options.useStrict` configuration settings
131
132* `TypeError` - if minDate parameter is after `options.maxDate`
133
134##### Emits
135
136* `dp.change` - if the new minDate is after currently selected moment (waiting for #472 to close in order to finalize this part)
137
138* `dp.error` - if the new minDate is after currently selected moment (waiting for #472 to close in order to finalize this part)
139
140----------------------
141
142#### maxDate()
143
144Returns the currently set moment of the `options.maxDate` or `false` if not set
145
146
147#### maxDate(maxDate)
148
149Takes a maxDate `string, Date, moment, boolean:false` parameter and disallows the user to select a moment that is after that moment. If a `boolean:false` value is passed `options.maxDate` is cleared and there is no restriction to the maximum moment the user can select.
150
151**Note:** If maxDate is before the currently selected moment the currently selected moment changes to maxDate
152
153##### Throws
154
155* `TypeError` - if maxDate parameter cannot be parsed using the `options.format` and `options.useStrict` configuration settings
156
157* `TypeError` - if maxDate parameter is before `options.minDate`
158
159##### Emits
160
161* `dp.change` - if the new maxDate is after currently selected moment  (waiting for #472 to close in order to finalize this part)
162
163* `dp.error` - if the new maxDate is after currently selected moment  (waiting for #472 to close in order to finalize this part)
164
165----------------------
166
167### useCurrent
168
169        Default: true
170
171On `show`, will set the picker to the current date/time.
172
173#### useCurrent()
174
175Returns a `boolean` or `string` with the `options.useCurrent` option configuration
176
177#### useCurrent(boolean or string)
178
179Takes a `boolean` or `string`. If a `boolean` true is passed and the components model moment is not set (either through `setDate` or through a valid value on the input element the component is attached to) then the first time the user opens the datetimepicker widget the value is initialized to the current moment of the action. If a false `boolean` is passed then no initialization happens on the input element. You can select the granularity on the initialized moment by passing one of the following strings (`'year', 'month', 'day', 'hour', 'minute'`) in the variable.
180
181If for example you pass `'day'` to the `setUseCurrent` function and the input field is empty the first time the user opens the datetimepicker widget the input text will be initialized to the current datetime with day granularity (ie if currentTime = `2014-08-10 13:32:33` the input value will be initialized to `2014-08-10 00:00:00`)
182
183**Note:** If the `options.defaultDate` is set or the input element the component is attached to has already a value that takes precedence and the functionality of `useCurrent` is not triggered!
184
185----------------------
186
187
188### collapse
189
190        Default: true
191
192Using a Bootstraps collapse to switch between date/time pickers.
193
194#### collapse()
195
196Returns a `boolean` of the `options.sideBySide`.
197
198
199#### collapse(collapse)
200
201Takes a `boolean`. If set to `false` the picker will display similar to `sideBySide` except vertical.
202
203----------------------
204
205
206### locale
207
208        Default: moment.locale()
209    Accepts: string, moment.locale('locale')
210
211See [momentjs](https://github.com/moment/moment/tree/develop/locale) for valid locales.
212
213You must include `moment-with-locales.js` or a local js file.
214
215#### locale()
216
217Returns the currently set locale of the `options.locale`
218
219#### locale(newLocale)
220
221Takes a `string` of any valid [moment locale](https://github.com/moment/moment/tree/develop/locale) e.g. `de` for German.
222
223##### Throws
224
225* `TypeError` - if the locale is not loaded via a separate script or `moment-with-locales`
226
227----------------------
228
229
230### defaultDate
231
232        Default: false
233    Accepts: date, moment, string
234
235Sets the picker default date/time. Overrides `useCurrent`
236
237#### defaultDate()
238
239Returns a `moment` with the `options.defaultDate` option configuration or `false` if not set
240
241#### defaultDate(defaultDate)
242
243Takes a `string, Date, moment, boolean:false`. Will set the picker's inital date. If a `boolean:false` value is passed the `options.defaultDate` parameter is cleared.
244
245* `TypeError` - if the provided date pass validation, including `disabledDates`, `enabledDates`, `minDate`, `maxDate`, and `daysOfWeekDisabled`
246
247* `TypeError` - if the provided date cannot be parsed by momentjs
248
249----------------------
250
251### en/disabledDates
252
253        Default: false
254    Accepts: array of [date, moment, string]
255
256#### disabledDates()
257
258Returns an array with the currently set disabled dates on the component.
259
260#### disabledDates(dates)
261
262Takes an `[` `string` or `Date` or `moment` `]` of values and disallows the user to select those days. Setting this takes precedence over `options.minDate`, `options.maxDate` configuration. Also calling this function removes the configuration of options.enabledDates if such exist.
263
264**Note:** These values are matched with `Day` granularity.
265
266----------------------
267
268#### enabledDates()
269
270Returns an array with the currently set enabled dates on the component.
271
272
273#### enabledDates(dates)
274
275Takes an `[` `string` or `Date` or `moment` `]` of values and allows the user to select only from those days. Setting this takes precedence over `options.minDate`, `options.maxDate` configuration. Also calling this function removes the configuration of options.disabledDates if such exist.
276
277**Note:** These values are matched with `Day` granularity.
278
279----------------------
280
281### icons
282
283        Default: {
284                time: 'glyphicon glyphicon-time',
285                date: 'glyphicon glyphicon-calendar',
286                up: 'glyphicon glyphicon-chevron-up',
287                down: 'glyphicon glyphicon-chevron-down',
288                previous: 'glyphicon glyphicon-chevron-left',
289                next: 'glyphicon glyphicon-chevron-right',
290                today: 'glyphicon glyphicon-screenshot',
291                clear: 'glyphicon glyphicon-trash',
292                close: 'glyphicon glyphicon-remove'
293            }
294    Accepts: object with all or some of the parameters above
295
296Change the default icons for the pickers functions.
297
298#### icons()
299
300Returns an `Ojbect` of `options.icons`
301
302#### icons(icons)
303
304Takes an `Ojbect` of `strings`.
305
306##### Throws
307
308* `TypeError` - if icons parameter is not an `Ojbect`
309
310----------------------
311
312### useStrict
313
314        Default: false
315
316Defines if moment should use strict date parsing when considering a date to be valid.
317
318#### useStrict()
319
320Returns a `boolean` of the `options.useStrict`
321
322#### useStrict(useStrict)
323
324Takes a `boolean`. If `useStrict` is `true`, momentjs parsing rules will be stricter when determining if a date is valid or not.
325
326----------------------
327
328
329### sideBySide
330
331        Default: false
332
333Shows the picker side by side when using the time and date together.
334
335![SideBySide](img/sideBySide.png)
336
337#### sideBySide()
338
339Returns a `boolean` of the `options.sideBySide`.
340
341#### sideBySide(sideBySide)
342
343Takes a `boolean`. If `sideBySide` is `true` and the time picker is used, both components will display side by side instead of collapsing.
344
345----------------------
346
347
348### daysOfWeekDisabled
349
350        Default: []
351    Accepts: array of numbers from 0-6
352
353Disables the section of days of the week, e.g. weekends.
354
355#### daysOfWeekDisabled()
356
357Returns an array with the `options.daysOfWeekDisabled` configuration setting of the component.
358
359#### daysOfWeekDisabled(daysOfWeek)
360
361Takes an `[` `Number`:`0` to `6` `]` and disallow the user to select weekdays that exist in this array. This has lower priority over the `options.minDate`, `options.maxDate`, `options.disabledDates` and `options.enabledDates` configuration settings.
362
363##### Emits
364
365* `dp.change` - if the currently selected moment falls in the values passed on the daysOfWeek parameter. (waiting for #472 to close in order to finalize this part)
366
367* `dp.error` - if the currently selected moment falls in the values passed on the daysOfWeek parameter. (waiting for #472 to close in order to finalize this part)
368
369----------------------
370
371### calendarWeeks
372
373        Default: false
374
375Shows the week of the year to the left of first day of the week.
376
377![calendarWeek](img/calendarWeeks.png)
378
379#### calendarWeeks()
380
381Returns a `boolean` with the current `options.calendarWeeks` option configuration
382
383#### calendarWeeks(boolean)
384
385Takes a `boolean` variable to set if the week numbers will appear to the left on the days view
386
387----------------------
388
389### viewMode
390
391        Default: 'days'
392    Accepts: 'decades','years','months','days'
393
394The default view to display when the picker is shown.
395
396**Note**: To limit the picker to selecting, for instance the year and month, use `format: MM/YYYY`.
397
398#### viewMode()
399
400Returns a `string` of the `options.viewMode`.
401
402#### viewMode(newViewMode)
403
404Takes a `string`. Valid values are `'days'`, `'months'`, `'years'` and `'decades'`
405
406##### Throws
407
408* `TypeError` - if `newViewMode` parameter is not an a `string` or if `newViewMode` is not a valid value.
409
410----------------------
411
412### toolbarPlacement
413
414        Default: 'default'
415    Accepts: 'default', 'top', 'bottom'
416
417Changes the placement of the icon toolbar.
418
419![toolbarPlacement](img/toolbarPlacement.png)
420
421#### toolbarplacement()
422
423Returns a `string` variable with the currently set `options.toolbarplacement` option.
424
425#### toolbarplacement(string)
426
427Takes a `string` value. Valid values are `'default'`, `'top'` and `'bottom'`.
428
429Changes the placement of the toolbar where the today, clear, component switch icon are located.
430
431----------------------
432
433### showTodayButton
434
435        Default: false
436
437Show the "Today" button in the icon toolbar.
438
439Clicking the "Today" button will set the calendar view and set the date to `now`.
440
441#### showTodayButton()
442
443Returns a `boolean` variable with the currently set `options.showTodayButton` option.
444
445#### showTodayButton(boolean)
446
447Takes a `boolean` variable to set if the Today button will appear on the widget
448
449----------------------
450
451### showClear
452
453        Default: false
454
455Show the "Clear" button in the icon toolbar.
456
457Clicking the "Clear" button will set the calendar to null.
458
459#### showClear()
460
461Returns a `boolean` variable with the currently set `options.showClear` option.
462
463#### showClear(boolean)
464
465Takes a `boolean` variable to set if the clear date button will appear on the widget
466
467----------------------
468
469### showClose
470
471        Default: false
472
473Show the "Close" button in the icon toolbar.
474
475Clicking the "Close" button will call `hide()`
476
477#### showClose()
478
479Returns a `boolean` variable with the currently set `options.showClose` option.
480
481#### showClose(boolean)
482
483Takes a `boolean` value.
484
485If `true`, an icon will be displayed on the toolbar that will hide the picker
486
487----------------------
488
489### widgetPositioning
490
491        Default: {
492                horizontal: 'auto'
493                vertical: 'auto'
494             }
495    Accepts: object with the all or one of the parameters above
496             horizontal: 'auto', 'left', 'right'
497             vertical: 'auto', 'top', 'bottom'
498
499#### widgetPositioning()
500
501Returns the currently set `options.widgetPositioning` object containing two keys `horizontal` and `vertical`
502
503#### widgetPositioning(positioningObject)
504
505Takes an object parameter that can contain two keys `vertical` and `horizontal` each having a value of `'auto', 'top', 'bottom'` for `vertical` and `'auto', 'left', 'right'` for `horizontal` which defines where the dropdown with the widget will appear relative to the input element the component is attached to.
506
507`'auto'` is the default value for both `horizontal` and `vertical` keys and it tries to automatically place the dropdown in a position that is visible to the user. Usually you should not override those options unless you have a special need in your layout.
508
509----------------------
510
511### widgetParent
512
513        Default: null
514    Accepts: string or jQuery object
515
516On picker show, places the widget at the identifier (string) or jQuery object **if** the element has css `position: 'relative'`
517
518#### widgetParent()
519
520Returns a `$(element)` variable with the currently set `options.widgetParent` option.
521
522#### widgetParent(widgetParent)
523
524Takes a `string` or `$(element)` value.
525
526----------------------
527
528### keepOpen
529
530        Default: false
531
532Will cause the date picker to stay open after selecting a date.
533
534#### keepOpen()
535
536Returns a `boolean` variable with the currently set `options.keepOpen` option.
537
538#### keepOpen(boolean)
539
540Takes a `boolean` value.
541
542----------------------
543
544### inline
545
546        Default: false
547
548Will display the picker inline without the need of a input field. This will also hide borders and shadows.
549
550#### inline()
551
552Returns a `boolean` variable with the currently set `options.inline` option.
553
554#### inline(boolean)
555
556Takes a `boolean` value.
557
558----------------------
559
560### keepInvalid
561
562<small>4.7.14</small>
563
564        Default: false
565
566Will cause the date picker to **not** revert or overwrite invalid dates.
567
568#### keepInvalid()
569
570Returns a `string` variable with the currently set `options.keepInvalid` option.
571
572#### keepInvalid(boolean)
573
574Takes a `boolean` value.
575
576If `true`, invalid dates will not be reverted to a previous selection or changed.
577
578----------------------
579
580### keyBinds
581
582        Default: up: function (widget) {
583                if (widget.find('.datepicker').is(':visible')) {
584                    this.date(this.date().clone().subtract(7, 'd'));
585                } else {
586                    this.date(this.date().clone().add(1, 'm'));
587                }
588            },
589            down: function (widget) {
590                if (!widget) {
591                    this.show();
592                }
593                else if (widget.find('.datepicker').is(':visible')) {
594                    this.date(this.date().clone().add(7, 'd'));
595                } else {
596                    this.date(this.date().clone().subtract(1, 'm'));
597                }
598            },
599            'control up': function (widget) {
600                if (widget.find('.datepicker').is(':visible')) {
601                    this.date(this.date().clone().subtract(1, 'y'));
602                } else {
603                    this.date(this.date().clone().add(1, 'h'));
604                }
605            },
606            'control down': function (widget) {
607                if (widget.find('.datepicker').is(':visible')) {
608                    this.date(this.date().clone().add(1, 'y'));
609                } else {
610                    this.date(this.date().clone().subtract(1, 'h'));
611                }
612            },
613            left: function (widget) {
614                if (widget.find('.datepicker').is(':visible')) {
615                    this.date(this.date().clone().subtract(1, 'd'));
616                }
617            },
618            right: function (widget) {
619                if (widget.find('.datepicker').is(':visible')) {
620                    this.date(this.date().clone().add(1, 'd'));
621                }
622            },
623            pageUp: function (widget) {
624                if (widget.find('.datepicker').is(':visible')) {
625                    this.date(this.date().clone().subtract(1, 'M'));
626                }
627            },
628            pageDown: function (widget) {
629                if (widget.find('.datepicker').is(':visible')) {
630                    this.date(this.date().clone().add(1, 'M'));
631                }
632            },
633            enter: function () {
634                this.hide();
635            },
636            escape: function () {
637                this.hide();
638            },
639            'control space': function (widget) {
640                if (widget.find('.timepicker').is(':visible')) {
641                    widget.find('.btn[data-action="togglePeriod"]').click();
642                }
643            },
644            t: function () {
645                this.date(moment());
646            },
647            'delete': function () {
648                this.clear();
649            }
650
651Allows for custom events to fire on keyboard press.
652
653#### keyBinds()
654
655Returns a `string` variable with the currently set `options.keyBinds` option.
656
657#### keyBinds(object)
658
659Takes an `object` value.
660
661Allows for several keyBinding functions to be specified for ease of access or accessibility. See the options page for defaults.
662
663----------------------
664
665
666### debug
667
668<small>4.7.14</small>
669
670        Default: false
671
672Will cause the date picker to stay open after a `blur` event.
673
674----------------------
675
676
677### ignoreReadonly
678
679<small>4.7.14</small>
680
681        Default: false
682
683Allow date picker show event to fire even when the associated input element has the `readonly="readonly"`property.
684
685#### ignoreReadonly()
686
687Returns a `boolean` variable with the currently set `options.ignoreReadonly` option.
688
689#### ignoreReadonly(boolean)
690
691Takes a `boolean` value.
692
693Set this to `true` to allow the picker to be used even if the input field is `readonly`. This will **not** bypass the `disabled` property
694
695----------------------
696
697### disabledTimeIntervals
698
699<small>4.14.30</small>
700
701        Default: false
702
703Disables time selection between the given `moments`.
704
705#### disabledTimeIntervals()
706
707Returns an `array` variable with the currently set `options.disabledTimeIntervals` option.
708
709#### disabledTimeIntervals(array)
710
711Takes a `array` value.
712
713The array **must** be in the following format `[moment(),moment()]`
714
715For example:
716
717    disabledTimeIntervals: [[moment({ h: 0 }), moment({ h: 8 })], [moment({ h: 18 }), moment({ h: 24 })]]
718
719Will disable times between 12-8am and 6-12pm today
720
721----------------------
722
723### allowInputToggle
724
725<small>4.14.30</small>
726
727        Default: false
728
729If `true`, the picker will show on textbox focus and icon click when used in a button group.
730
731#### allowInputToggle()
732
733Returns a `boolean` variable with the currently set `options.allowInputToggle` option.
734
735#### allowInputToggle(boolean)
736
737Takes a `boolean` value.
738
739If `true`, the picker will show on textbox focus and icon click when used in a button group
740
741----------------------
742
743### focusOnShow
744
745<small>4.14.30</small>
746
747        Default: true
748
749If `false`, the textbox will not be given focus when the picker is shown.
750
751#### focusOnShow()
752
753Returns a `boolean` variable with the currently set `options.focusOnShow` option.
754
755#### focusOnShow(boolean)
756
757Takes a `boolean` value.
758
759If `false`, the textbox will not be given focus when the picker is shown
760
761----------------------
762### en/disabledHours
763
764<small>4.14.30</small> Issue: #851
765
766        Default: false
767
768#### disabledHours()
769
770Returns an `array` variable with the currently set `options.en/disabledHours` option.
771
772#### disabledHours(boolean)
773
774Takes a `array` value.
775
776Must be in 24 hour format. Will allow or disallow hour selections (much like `disabledTimeIntervals`) but will affect all days.
777
778Like `en/disabledDates`, these options are mutually exclusive and will reset one of the options back to false.
779
780    disabledHours: [0, 1, 2, 3, 4, 5, 6, 7, 8, 18, 19, 20, 21, 22, 23, 24]
781    enabledHours: [9, 10, 11, 12, 13, 14, 15, 16]
782
783----------------------
784
785### viewDate
786
787<small>4.14.30</small>
788
789        Default: false
790
791This will change the `viewDate` without changing or setting the selected date.
792
793----------------------
794
795### parseInputDate
796
797<small>4.14.30</small> Issue #1095
798
799#### parseInputDate()
800
801Returns a `function` with the currently set `options.parseInputDate`
802
803#### parseInputDate(function)
804
805Takes a `function`
806
807Allows custom input formatting For example: the user can enter 'yesterday' or '30 days ago'.
808
809Example:
810
811```
812var parseRelativeDate = function(relativeDate) {
813
814    switch (relativeDate) {
815        case 'today':
816            return moment()
817        case 'yesterday':
818            return moment().subtract(1, 'day');
819        default:
820            return moment()
821                .subtract(Number(relativeDate.replace("days ago", "").trim()), 'days');
822    }
823}
824
825var parseInputDate = function(inputDate) {
826    var relativeDatePattern = /today|yesterday|[0-9]+\s+(days ago)/,
827        resultDate;
828
829    if (moment.isMoment(inputDate) || inputDate instanceof Date) {
830        resultDate = moment(inputDate);
831    } else {
832        var relativeDate = inputDate.match(relativeDatePattern),
833            parseDate = null;
834
835        if (relativeDate !== null)
836          parseDate = this.parseRelativeDate(inputDate.match(relativeDatePattern)[0]);
837        else
838          parseDate = moment();
839
840        resultDate = moment(parseDate, "YYYY-MM-DD");
841    }
842
843    return resultDate;
844}
845```
846
847----------------------
848
849### tooltips
850
851<small>4.15.35</small>
852
853```
854tooltips: {
855    today: 'Go to today',
856    clear: 'Clear selection',
857    close: 'Close the picker',
858    selectMonth: 'Select Month',
859    prevMonth: 'Previous Month',
860    nextMonth: 'Next Month',
861    selectYear: 'Select Year',
862    prevYear: 'Previous Year',
863    nextYear: 'Next Year',
864    selectDecade: 'Select Decade',
865    prevDecade: 'Previous Decade',
866    nextDecade: 'Next Decade',
867    prevCentury: 'Previous Century',
868    nextCentury: 'Next Century'
869}
870```
871
872This will change the `tooltips` over each icon to a custom string.
873
874#### tooltips()
875
876Returns an `Ojbect` of `options.tooltips`
877
878#### tooltips(tooltips)
879
880Takes an `Ojbect` of `strings`.
881
882##### Throws
883
884* `TypeError` - if tooltips parameter is not an `Ojbect`
885
886----------------------
887
888
889### timeZone
890
891<small>4.17.37</small>
892
893```
894timeZone: ''
895```
896
897Allows the setting of the Time Zone. You must include [`moment-timezone.js`](http://momentjs.com/timezone/) and `moment-timzone` data. See moment timezone documentation for usage.
898
899#### timeZone()
900
901Returns an `string` of `options.timeZone`
902
903#### timeZone(timeZone)
904
905Takes an `string` of a valid timezone.
906
907##### Throws
908
909* `TypeError` - if tooltips parameter is not an `string`
Note: See TracBrowser for help on using the repository browser.