mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-15 22:28:14 +00:00
Fix #515
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
/*
|
||||
* daterangepicker.js
|
||||
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||
* This software may be modified and distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||
*
|
||||
* See the LICENSE file for details.
|
||||
*/ollow the UMD template https://github.com/umdjs/umd/blob/master/templates/returnExportsGlobal.js
|
||||
/**
|
||||
* @version: 2.1.25
|
||||
* @author: Dan Grossman http://www.dangrossman.info/
|
||||
* @copyright: Copyright (c) 2012-2017 Dan Grossman. All rights reserved.
|
||||
* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
|
||||
* @website: http://www.daterangepicker.com/
|
||||
*/
|
||||
// Follow the UMD template https://github.com/umdjs/umd/blob/master/templates/returnExportsGlobal.js
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Make globaly available as well
|
||||
define(['moment', 'jquery'], function (moment, jquery) {
|
||||
if (!jquery.fn) jquery.fn = {}; // webpack server rendering
|
||||
return (root.daterangepicker = factory(moment, jquery));
|
||||
});
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
@@ -19,7 +21,8 @@
|
||||
jQuery = require('jquery');
|
||||
if (!jQuery.fn) jQuery.fn = {};
|
||||
}
|
||||
module.exports = factory(require('moment'), jQuery);
|
||||
var moment = (typeof window != 'undefined' && typeof window.moment != 'undefined') ? window.moment : require('moment');
|
||||
module.exports = factory(moment, jQuery);
|
||||
} else {
|
||||
// Browser globals
|
||||
root.daterangepicker = factory(root.moment, root.jQuery);
|
||||
@@ -159,9 +162,13 @@
|
||||
if (typeof options.locale.weekLabel === 'string')
|
||||
this.locale.weekLabel = options.locale.weekLabel;
|
||||
|
||||
if (typeof options.locale.customRangeLabel === 'string')
|
||||
this.locale.customRangeLabel = options.locale.customRangeLabel;
|
||||
|
||||
if (typeof options.locale.customRangeLabel === 'string'){
|
||||
//Support unicode chars in the custom range name.
|
||||
var elem = document.createElement('textarea');
|
||||
elem.innerHTML = options.locale.customRangeLabel;
|
||||
var rangeHtml = elem.value;
|
||||
this.locale.customRangeLabel = rangeHtml;
|
||||
}
|
||||
}
|
||||
this.container.addClass(this.locale.direction);
|
||||
|
||||
@@ -872,7 +879,7 @@
|
||||
|
||||
//Preserve the time already selected
|
||||
var timeSelector = this.container.find('.calendar.right .calendar-time div');
|
||||
if (!this.endDate && timeSelector.html() != '') {
|
||||
if (timeSelector.html() != '') {
|
||||
|
||||
selected.hour(timeSelector.find('.hourselect option:selected').val() || selected.hour());
|
||||
selected.minute(timeSelector.find('.minuteselect option:selected').val() || selected.minute());
|
||||
@@ -1266,7 +1273,7 @@
|
||||
var rightCalendar = this.rightCalendar;
|
||||
var startDate = this.startDate;
|
||||
if (!this.endDate) {
|
||||
this.container.find('.calendar td').each(function(index, el) {
|
||||
this.container.find('.calendar tbody td').each(function(index, el) {
|
||||
|
||||
//skip week numbers, only look at dates
|
||||
if ($(el).hasClass('week')) return;
|
||||
|
||||
Reference in New Issue
Block a user