luisfarzati/ng-bs-daterangepicker

Can you implement for use 'locale'

Closed this issue · 1 comments

Hi, i really love to use the option 'locale' :), can you take a view of that?

My object Options:

 $scope.rangeOptions = {
      ranges: {
        //'Hoy': [$moment(), $moment()],
        /*'Ayer': [$moment().subtract(1, 'days'), $moment().subtract(1, 'days')],
        'Últimos 7 días': [$moment().subtract(6, 'days'), 
                           $moment()],
        'Último 30 días': [$moment().subtract(29, 'days'), 
                           $moment()],*/
        'Este mes': [$moment().startOf('month'),
                     $moment().endOf('month')],
        'Mes pasado': [$moment().subtract(1, 'month').startOf('month'), 
                       $moment().subtract(1, 'month').endOf('month')],
        'Hace un año': [$moment().subtract(1,'year').startOf('month'), 
                                    $moment().subtract(1,'year').endOf('month')],
        'Este año' : [ {'year': $moment().get('year'), 'month': 0, 'day':1  },
                       {'year': $moment().get('year'), 'month': 11, 'day': 31}],
        'Año pasado' : [ {'year': $moment().subtract(1,'year').get('year'), 'month': 0, 'day':1  },
                       {'year': $moment().subtract(1,'year').get('year'), 'month': 11, 'day': 31}],
      },
      locale : {
              "format": "YYYY-MM-DD",
              "separator": " - ",
              "applyLabel": "Aplicar",
              "cancelLabel": "Cancelar",
              "fromLabel": "Desde",
              "toLabel": "Hasta",
              "customRangeLabel": "Personalizado",
              "daysOfWeek": [
                  "Dom",
                  "Lun",
                  "Mar",
                  "Mie",
                  "Jue",
                  "Vie",
                  "Sab"
              ],
              "monthNames": [
                  "Enero",
                  "Febrero",
                  "Marzo",
                  "Abril",
                  "Mayo",
                  "Junio",
                  "Julio",
                  "Agosto",
                  "Septiembre",
                  "Octubre",
                  "Noviembre",
                  "Diciembre"
              ],
              "firstDay": 1
      },
      opens: 'left',
      startDate: $moment().startOf('month'),
      endDate: $moment().endOf('month'),
      parentEl: '#content',
    };