date filter done.
Showing
1 changed file
with
15 additions
and
19 deletions
... | @@ -9,20 +9,16 @@ | ... | @@ -9,20 +9,16 @@ |
9 | </div> | 9 | </div> |
10 | 10 | ||
11 | <div class="container"> | 11 | <div class="container"> |
12 | <div class="row"> | 12 | <div class="input-group mb-3"> |
13 | <div class="col-md-4 m-b-3"> | 13 | <div class="input-group-prepend" style="display: block;padding: 10px;text-align: justify;width: 25em;"> |
14 | <div class="input-group-prepend" style="display: block;padding: 10px;text-align: justify;width: 25em;"> | 14 | <label for="date_filter">Date</label> |
15 | <label for="date_filter">Date</label> | 15 | <input type="date" id="date_filter" class="form-control" aria-label="Default" aria-describedby="date_filter"> |
16 | <input type="date" id="date_filter" class="form-control" aria-label="Default" aria-describedby="date_filter"> | 16 | <span id="date_filter_div"></span> |
17 | </div> | ||
18 | <div id="date_filter_error_div"></div> | ||
19 | </div> | 17 | </div> |
20 | <div class="col-md-4 m-b-3"> | 18 | <div class="input-group-prepend" style="display: block;padding: 10px;text-align: justify;width: 25em;margin-top: 30px;"> |
21 | <div> | 19 | <button id="filter_logs" class="btn btn-primary" type="button" title="Filter">Filter |
22 | <button id="filter_logs" class="btn btn-primary" type="button" title="Filter">Filter | ||
23 | <span class="icon-stack"><i style="line-height: 0.5em;" class="icon-filter icon-stack-base" aria-hidden="true"></i> | 20 | <span class="icon-stack"><i style="line-height: 0.5em;" class="icon-filter icon-stack-base" aria-hidden="true"></i> |
24 | <i style="line-height: 0.2em;" class="icon-add"></i></span></button> | 21 | <i style="line-height: 0.2em;" class="icon-add"></i></span></button> |
25 | </div> | ||
26 | </div> | 22 | </div> |
27 | </div> | 23 | </div> |
28 | </div> | 24 | </div> |
... | @@ -60,19 +56,19 @@ var log_DataTable = ""; | ... | @@ -60,19 +56,19 @@ var log_DataTable = ""; |
60 | ] | 56 | ] |
61 | }); | 57 | }); |
62 | 58 | ||
63 | $('#view_slots_filter').click(function() { | 59 | $('#filter_logs').click(function() { |
64 | var date = $("#date_filter").val(); | 60 | var date = $("#date_filter").val(); |
65 | if((date == '')) { | 61 | if((date == '')) { |
66 | var alert_message = '<p style="color: red;">* Please select date filter.</p>'; | 62 | var alert_message = '<p style="color: red;">* Date is mandatory.</p>'; |
67 | if(('#date_filter_error_div').length != 0 ) { | 63 | if(('#date_filter_div').length != 0 ) { |
68 | $('#date_filter_error_div').empty(); | 64 | $('#date_filter_div').empty(); |
69 | } | 65 | } |
70 | $('#date_filter_error_div').append(alert_message); | 66 | $('#date_filter_div').append(alert_message); |
71 | 67 | ||
72 | } | 68 | } |
73 | else { | 69 | else { |
74 | if(('#date_filter_error_div').length != 0 ) { | 70 | if(('#date_filter_div').length != 0 ) { |
75 | $('#date_filter_error_div').empty(); | 71 | $('#date_filter_div').empty(); |
76 | } | 72 | } |
77 | $.ajax({ | 73 | $.ajax({ |
78 | method: "GET", | 74 | method: "GET", | ... | ... |
-
Please register or sign in to post a comment