mangroveorg/datawinners

View on GitHub
datawinners/media/javascript/monthly_date_picker/month-picker.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function init has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        init:function (options) {
            return this.each(function () {
                var
                    $this = $(this),
                    data = $this.data('monthpicker'),
Severity: Major
Found in datawinners/media/javascript/monthly_date_picker/month-picker.js - About 2 hrs to fix

    Function mountWidget has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            mountWidget:function (global_settings, settings) {
                var
                    monthpicker = this,
                    container = $('<div id="' + settings.id + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" />'),
                    header = $('<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix ui-corner-all mtz-monthpicker" />'),
    Severity: Minor
    Found in datawinners/media/javascript/monthly_date_picker/month-picker.js - About 1 hr to fix

      Function format_date has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          function format_date(global_settings, month_start, year_start, month_end, year_end) {
      Severity: Minor
      Found in datawinners/media/javascript/monthly_date_picker/month-picker.js - About 35 mins to fix

        Function setMPDates has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        function setMPDates(monthpicker, start_year, start_month, end_year, end_month){
        Severity: Minor
        Found in datawinners/media/javascript/monthly_date_picker/month-picker.js - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status