docs: function (element, options) {
  		var that = this;
  
  		this.element = $(element);
  
  		// add container for single page application
  		// when page switch the datetimepicker div will be removed also.
  		this.container = options.container || 'body';
  
  		this.language = options.language || this.element.data('date-language') || "en";
  		this.language = this.language in dates ? this.language : "en";
  		this.isRTL = dates[this.language].rtl || false;
  		this.formatType = options.formatType || this.element.data('format-type') || 'standard';
  		this.format = DPGlobal.parseFormat(options.format || this.element.data('date-format') || dates[this.language].format || DPGlobal.getDefaultFormat(this.formatType, 'input'), this.formatType);
  		this.isInline = false;
  		this.isVisible = false;
  		this.isInput = this.element.is('input');
  		this.fontAwesome = options.fontAwesome || this.element.data('font-awesome') || false;
  
  		this.bootcssVer = options.bootcssVer || (this.isInput ? (this.element.is('.form-control') ? 3 : 2) : ( this.bootcssVer = this.element.is('.input-group') ? 3 : 2 ));
  
  		this.component = this.element.is('.date') ? ( this.bootcssVer == 3 ? this.element.find('.input-group-addon .glyphicon-th, .input-group-addon .glyphicon-time, .input-group-addon .glyphicon-calendar, .input-group-addon .glyphicon-calendar, .input-group-addon .fa-calendar, .input-group-addon .fa-clock-o').parent() : this.element.find('.add-on .icon-th, .add-on .icon-time, .add-on .icon-calendar .fa-calendar .fa-clock-o').parent()) : false;
  		this.componentReset = this.element.is('.date') ? ( this.bootcssVer == 3 ? this.element.find('.input-group-addon .glyphicon-remove .fa-times').parent() : this.element.find('.add-on .icon-remove .fa-times').parent()) : false;
  		this.hasInput = this.component && this.element.find('input').length;
  		if (this.component && this.component.length === 0) {
  			this.component = false;
  		}
  		this.linkField = options.linkField || this.element.data('link-field') || false;
  		this.linkFormat = DPGlobal.parseFormat(options.linkFormat || this.element.data('link-format') || DPGlobal.getDefaultFormat(this.formatType, 'link'), this.formatType);
  		this.minuteStep = options.minuteStep || this.element.data('minute-step') || 5;
  		this.pickerPosition = options.pickerPosition || this.element.data('picker-position') || 'bottom-right';
  		this.showMeridian = options.showMeridian || this.element.data('show-meridian') || false;
  		this.initialDate = options.initialDate || new Date();
  		this.zIndex = options.zIndex || this.element.data('z-index') || undefined;
  
  		this.icons = {
  			leftArrow: this.fontAwesome ? 'fa-arrow-left' : (this.bootcssVer === 3 ? 'glyphicon-arrow-left' : 'icon-arrow-left'),
  			rightArrow: this.fontAwesome ? 'fa-arrow-right' : (this.bootcssVer === 3 ? 'glyphicon-arrow-right' : 'icon-arrow-right')
  		};
  		this.icontype = this.fontAwesome ? 'fa' : 'glyphicon';
  
  		this._attachEvents();
  
  		this.formatViewType = "datetime";
  		if ('formatViewType' in options) {
  			this.formatViewType = options.formatViewType;
  		} else if ('formatViewType' in this.element.data()) {
  			this.formatViewType = this.element.data('formatViewType');
  		}
  
  		this.minView = 0;
  		if ('minView' in options) {
  			this.minView = options.minView;
  		} else if ('minView' in this.element.data()) {
  			this.minView = this.element.data('min-view');
  		}
  		this.minView = DPGlobal.convertViewMode(this.minView);
  
  		this.maxView = DPGlobal.modes.length - 1;
  		if ('maxView' in options) {
  			this.maxView = options.maxView;
  		} else if ('maxView' in this.element.data()) {
  			this.maxView = this.element.data('max-view');
  		}
  		this.maxView = DPGlobal.convertViewMode(this.maxView);
  
  		this.wheelViewModeNavigation = false;
  		if ('wheelViewModeNavigation' in options) {
  			this.wheelViewModeNavigation = options.wheelViewModeNavigation;
  		} else if ('wheelViewModeNavigation' in this.element.data()) {
  			this.wheelViewModeNavigation = this.element.data('view-mode-wheel-navigation');
  		}
  
  		this.wheelViewModeNavigationInverseDirection = false;
  
  		if ('wheelViewModeNavigationInverseDirection' in options) {
  			this.wheelViewModeNavigationInverseDirection = options.wheelViewModeNavigationInverseDirection;
  		} else if ('wheelViewModeNavigationInverseDirection' in this.element.data()) {
  			this.wheelViewModeNavigationInverseDirection = this.element.data('view-mode-wheel-navigation-inverse-dir');
  		}
  
  		this.wheelViewModeNavigationDelay = 100;
  		if ('wheelViewModeNavigationDelay' in options) {
  			this.wheelViewModeNavigationDelay = options.wheelViewModeNavigationDelay;
  		} else if ('wheelViewModeNavigationDelay' in this.element.data()) {
  			this.wheelViewModeNavigationDelay = this.element.data('view-mode-wheel-navigation-delay');
  		}
  
  		this.startViewMode = 2;
  		if ('startView' in options) {
  			this.startViewMode = options.startView;
  		} else if ('startView' in this.element.data()) {
  			this.startViewMode = this.element.data('start-view');
  		}
  		this.startViewMode = DPGlobal.convertViewMode(this.startViewMode);
  		this.viewMode = this.startViewMode;
  
  		this.viewSelect = this.minView;
  		if ('viewSelect' in options) {
  			this.viewSelect = options.viewSelect;
  		} else if ('viewSelect' in this.element.data()) {
  			this.viewSelect = this.element.data('view-select');
  		}
  		this.viewSelect = DPGlobal.convertViewMode(this.viewSelect);
  
  		this.forceParse = true;
  		if ('forceParse' in options) {
  			this.forceParse = options.forceParse;
  		} else if ('dateForceParse' in this.element.data()) {
  			this.forceParse = this.element.data('date-force-parse');
  		}
  		var template = this.bootcssVer === 3 ? DPGlobal.templateV3 : DPGlobal.template;
  		while (template.indexOf('{iconType}') !== -1) {
  			template = template.replace('{iconType}', this.icontype);
  		}
  		while (template.indexOf('{leftArrow}') !== -1) {
  			template = template.replace('{leftArrow}', this.icons.leftArrow);
  		}
  		while (template.indexOf('{rightArrow}') !== -1) {
  			template = template.replace('{rightArrow}', this.icons.rightArrow);
  		}
  		this.picker = $(template)
  			.appendTo(this.isInline ? this.element : this.container) // 'body')
  			.on({
  				click:     $.proxy(this.click, this),
  				mousedown: $.proxy(this.mousedown, this)
  			});
  
  		if (this.wheelViewModeNavigation) {
  			if ($.fn.mousewheel) {
  				this.picker.on({mousewheel: $.proxy(this.mousewheel, this)});
  			} else {
  				console.log("Mouse Wheel event is not supported. Please include the jQuery Mouse Wheel plugin before enabling this option");
  			}
  		}
  
  		if (this.isInline) {
  			this.picker.addClass('datetimepicker-inline');
  		} else {
  			this.picker.addClass('datetimepicker-dropdown-' + this.pickerPosition + ' dropdown-menu');
  		}
  		if (this.isRTL) {
  			this.picker.addClass('datetimepicker-rtl');
  			var selector = this.bootcssVer === 3 ? '.prev span, .next span' : '.prev i, .next i';
  			this.picker.find(selector).toggleClass(this.icons.leftArrow + ' ' + this.icons.rightArrow);
  		}
  		$(document).on('mousedown', function (e) {
  			// Clicked outside the datetimepicker, hide it
  			if ($(e.target).closest('.datetimepicker').length === 0) {
  				that.hide();
  			}
  		});
  
  		this.autoclose = false;
  		if ('autoclose' in options) {
  			this.autoclose = options.autoclose;
  		} else if ('dateAutoclose' in this.element.data()) {
  			this.autoclose = this.element.data('date-autoclose');
  		}
  
  		this.keyboardNavigation = true;
  		if ('keyboardNavigation' in options) {
  			this.keyboardNavigation = options.keyboardNavigation;
  		} else if ('dateKeyboardNavigation' in this.element.data()) {
  			this.keyboardNavigation = this.element.data('date-keyboard-navigation');
  		}
  
  		this.todayBtn = (options.todayBtn || this.element.data('date-today-btn') || false);
  		this.todayHighlight = (options.todayHighlight || this.element.data('date-today-highlight') || false);
  
  		this.weekStart = ((options.weekStart || this.element.data('date-weekstart') || dates[this.language].weekStart || 0) % 7);
  		this.weekEnd = ((this.weekStart + 6) % 7);
  		this.startDate = -Infinity;
  		this.endDate = Infinity;
  		this.daysOfWeekDisabled = [];
  		this.setStartDate(options.startDate || this.element.data('date-startdate'));
  		this.setEndDate(options.endDate || this.element.data('date-enddate'));
  		this.setDaysOfWeekDisabled(options.daysOfWeekDisabled || this.element.data('date-days-of-week-disabled'));
  		this.setMinutesDisabled(options.minutesDisabled || this.element.data('date-minute-disabled'));
  		this.setHoursDisabled(options.hoursDisabled || this.element.data('date-hour-disabled'));
  		this.fillDow();
  		this.fillMonths();
  		this.update();
  		this.showMode();
  
  		if (this.isInline) {
  			this.show();
  		}
  	}