How to disable future date in date column filter

How to disable future date in date column filter

enayathalienayathali Posts: 2Questions: 2Answers: 0

{% block content %}
<html>
<head>
<title>View Ticket</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% load staticfiles %}
<link type="text/css" rel="stylesheet" href="css/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="css/styles.css">
<link type="text/css" rel="stylesheet" href="css/Stickyfooter.css">
<link type="text/css" rel="stylesheet" href="css/datatable.min.css">
<link type="text/css" rel="stylesheet" href="css/jquery.dataTables.yadcf.css">
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/datatable.min.js"></script>
<script src="js/jquery.dataTables.yadcf.js"></script>
<script src="js/jQuery UI.js"></script>
<script>
$(document).ready(function(){
$('#myTable').dataTable({
"order": [[ 5, "desc" ]]
});
$('#myTable').dataTable().yadcf([
{column_number : 2, data: ['Minor', 'Major', 'Critical'], filter_default_label: "Select"},
{column_number : 3, data: ['New', 'Assigned', 'ReAssigned','Resolved'], filter_default_label:"Select",filter_match_mode:"exact"},
{column_number : 5, filter_type: "range_date",date_format:"yyyy/mm/dd"}
]);
});
</script>
</head>
<body>
<form action="/HomePage/ViewTicket/" data-toggle="validator" method="POST">{% csrf_token %}
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="panel">
<div class="panel-heading" id="heading-color" style="padding: 5px 10px 2px;">
<h4 class="panel-title">View Ticket</h4>
</div>
<div class="panel-body">
<table id="myTable" class="table table-striped" style="font-size: 1.1em;font-family: 'Source Sans Pro',sans-serif;color:#333;">
<thead>
<tr>
<th>Ticket</th>
<th>Subject</th>
<th width="112px;">Priority</th>
<th width="117px;">Status</th>
<th>Assigned To</th>
<th>Created Date</th>
<th>Update</th>
</tr>
</thead>
<tbody>
{% for u in obj %}
{% if u.Priority == "Major" %}
<tr>
<td style="text-align:center;">{{ u.Ticketid }}</a></td>
<td class="subject">{{ u.Subject }}</td>
<td style="color:#FF8000;font-weight:bold;text-align:center;">{{u.Priority }} <i class="glyphicon glyphicon-flag" > </td>
<td style="text-align:center;">{{ u.Status }}</td>
<td style="text-align:center;">{{ u.AssigneeName }}</td>
<td style="text-align:center;">{{ u.CreatedDate|date:"Y/m/d H:i:s"}}</td>
<td style="text-align:center;"><ahref="/HomePage/ticketdetails/{{u.Ticketid}}">View/Update</a></td>
</tr>
{% elif u.Priority == "Minor" %}
<tr>
<td class="center" style="text-align:center;">{{ u.Ticketid }}</a></td>
<td class="center">{{ u.Subject }}</td>
<td class="center" style="text-align:center;">{{ u.Priority }}</td>
<td class="center" style="text-align:center;">{{ u.Status }}</td>
<td class="center" style="text-align:center;">{{ u.AssigneeName }}</td>
<td class="center" style="text-align:center;">{{ u.CreatedDate|date:"Y/m/d H:i:s"}}</td>
<td class="center" style="text-align:center;"><ahref="/HomePage/ticketdetails/{{u.Ticketid}}">View/Update</a></td>
</tr>
{% elif u.Priority == "Critical" %}
<tr>
<td class="center" style="text-align:center;">{{ u.Ticketid }}</a></td>
<td class="center">{{ u.Subject }}</td>
<td class="center" style="color:#FF0000;font-weight:bold;text-align:center;">{{u.Priority }} <i class="glyphicon glyphicon-star-empty" ></td>
<td class="center" style="text-align:center;">{{ u.Status }}</td>
<td class="center" style="text-align:center;">{{ u.AssigneeName }}</td>
<td class="center" style="text-align:center;">{{ u.CreatedDate|date:"Y/m/d H:i:s" }}</td>
<td class="center" style="text-align:center;"><ahref="/HomePage/ticketdetails/{{u.Ticketid}}">View/Update</a></td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</form>
<footer class="footer">

    </footer>
</body>

</html>

This discussion has been closed.