Advertisement
krot

daterangepicker daterange

Apr 18th, 2019
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 1.44 KB | None | 0 0
  1.   $('.daterange').daterangepicker({
  2.                     timePicker: true,
  3.                     timePicker24Hour: true,
  4.                     startDate: date[0]==''?moment().startOf('hour'):date[0],
  5.                     endDate: date[1]==''?moment().startOf('hour').add(32, 'hour'):date[1] ,
  6.                     locale: {
  7.                       format: 'YYYY-MM-DD HH:mm',
  8.                       "separator": " - ",
  9.         "applyLabel": "Ок",
  10.         "cancelLabel": "Отмена",
  11.         "fromLabel": "От",
  12.         "toLabel": "До",
  13.         "customRangeLabel": "Custom",
  14.         "weekLabel": "W",
  15.         "daysOfWeek": [
  16.             "Вс",
  17.             "Пн",
  18.             "Вт",
  19.             "Ср",
  20.             "Чт",
  21.             "Пт",
  22.             "Сб"
  23.         ],
  24.         "monthNames": [
  25.             "Январь",
  26.             "Февраль",
  27.             "Март",
  28.             "Апрель",
  29.             "Май",
  30.             "Июнь",
  31.             "Июль",
  32.             "Август",
  33.             "Сентябрь",
  34.             "Октябрь",
  35.             "Ноябрь",
  36.             "Декабрь"
  37.         ],
  38.          "firstDay": 1
  39.                     }
  40.                   });
  41.                  $(".select2-multiple").select2({
  42.                     placeholder: "Выберите направление",
  43.                     allowClear: true,
  44.                       templateResult: function  (row) {
  45.                         image=$(row.element).data('image');
  46.                         if (!image) return row.text;
  47.                       return  $(
  48.                         '<span><img src="'+image+'" class="img-flag" /> ' + row.text + '</span>'
  49.                       );
  50.                 },
  51.                 });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement