Skip to content

Commit

Permalink
Merge pull request #112 from Shivam1904/master
Browse files Browse the repository at this point in the history
Date Range picker script for filter  added on profile page
  • Loading branch information
deshraj committed May 18, 2016
2 parents b6f361e + bd6f947 commit e0887d9
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
1 change: 0 additions & 1 deletion HTTP_200/templates/notices/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="{% static "css/default.css"%}">
<link rel="stylesheet" href="{% static "css/main.css"%}">

<link rel="stylesheet" href="{% static "css/style.css"%}">
<link rel="stylesheet" href="{% static "css/font-awesome.css"%}">

Expand Down
29 changes: 28 additions & 1 deletion HTTP_200/templates/profiles/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#2d2251">

<link rel="shortcut icon" type="image/x-icon" href="{% static "images/favicon.ico"%}">
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="{% static "css/default.css" %}">
Expand Down Expand Up @@ -620,5 +619,33 @@ <h3>Search for Uploaded Notices.</h3>
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script src="{% static "js/jquery.daterange.js" %}"></script>
<script src="{% static "js/main.js" %}"></script>

<script>
var width = $(document).width();
if(width>640)
{
$("#mobile-date").hide();
$(function () {
$("#daterangepicker").daterange({
dateFormat: "dd/mm/yy", //date format
rangeSeparator: "-" // the string between first and last date
});
});
}
else{
$("#desktop-date").hide();
$(function() {
$("#mobile-datepicker-1, #mobile-datepicker-2").datepicker();
});
}


$(".search-container").on("scroll", function(){
var cale = $(this).find("input.hasDatepicker");
$("#ui-datepicker-div").css("top", cale.offset().top +cale.outerHeight());

})

</script>
</body>
</html>

0 comments on commit e0887d9

Please sign in to comment.