Total Complexity | 4 |
Complexity/F | 2 |
Lines of Code | 21 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | Admin.Modules.add('form.elements.daterange', () => { |
||
|
|||
2 | $('.input-daterange').each((i, item) => { |
||
3 | let $self = $(item); |
||
4 | |||
5 | let picker = $self.daterangepicker({ |
||
6 | showDropdowns: true, |
||
7 | locale: { |
||
8 | format: $self.data('format'), |
||
9 | separator: '::' |
||
10 | } |
||
11 | }) |
||
12 | |||
13 | if ($self.data('startdate')) { |
||
14 | $self.data('daterangepicker').setStartDate($self.data('startdate')); |
||
15 | } |
||
16 | |||
17 | if ($self.data('enddate')) { |
||
18 | $self.data('daterangepicker').setEndDate($self.data('enddate')); |
||
19 | } |
||
20 | }) |
||
21 | }) |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.