_this.mto.hide();
_this.daypick.hide();
- _this.dateRange = function() {
- return {
- date_from : _this.mfrom.getValue(),
- date_to :Date.parseDate(_this.mfrom.getValue(), 'Y-n-d').add(Date.YEAR, 1).format('Y-m-d')
-
- };
-
- };
+
break;
_this.mfrom.show();
_this.mto.hide();
_this.daypick.hide();
- _this.dateRange = function() {
- return {
- date_from : _this.mfrom.getValue(),
- date_to :Date.parseDate(_this.mfrom.getValue(), 'Y-n-d').add(Date.MONTH, 6).format('Y-m-d')
- };
- };
+
break;
case 'Q':
_this.mfrom.show();
_this.mto.hide();
_this.daypick.hide();
- _this.dateRange = function() {
- return {
- date_from : _this.mfrom.getValue(),
- date_to :Date.parseDate(_this.mfrom.getValue(), 'Y-n-d').add(Date.MONTH, 3).format('Y-m-d')
- };
- };
+
break;
case 'M':
_this.mfrom.show();
_this.mto.hide();
_this.daypick.hide();
- _this.dateRange = function() {
- return {
- date_from : _this.mfrom.getValue(),
- date_to :Date.parseDate(_this.mfrom.getValue(), 'Y-n-d').add(Date.MONTH, 1).format('Y-m-d')
- };
- };
+
break;
_this.mfrom.show();
_this.mto.show();
_this.daypick.hide();
- _this.dateRange = function() {
- return {
- date_from : _this.mfrom.getValue(),
- date_to : _this.mto.getValue()
- };
- };
+
break;