Skip to content

Commit

Permalink
Fixed issue about end date picker
Browse files Browse the repository at this point in the history
  • Loading branch information
vitoriamr committed Jan 23, 2018
1 parent 501bb5d commit 8a32489
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions app/assets/javascripts/app/manage/statistics_filter.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,23 @@ class mconf.StatisticsFilter
$('.datetime-picker-input').on 'change', ->
checkDate()

isAllSelected = ->
selected = $('.starts-at-wrapper .btn.active').data('attr-value')
selected is 0
start.on 'change', ->
limitMinimumEnd()

filterByDate = (el) ->
if el
selected = $(el).data('attr-value')
else
selected = $('.starts-at-wrapper .btn.active').data('attr-value')

limitMinimumEnd = ->
startDate = statistics_starts_on_time.value

if startDate != ""
mconf.DateTimeInput.setStartDate($(statistics_ends_on_time), new Date(startDate))

checkDate = ->
startDate = statistics_starts_on_time.value
endDate = statistics_ends_on_time.value

$(submitSelector).removeAttr('disabled')

if startDate != ""
mconf.DateTimeInput.setStartDate($(statistics_ends_on_time), new Date(startDate))

0 comments on commit 8a32489

Please sign in to comment.