Skip to content

Commit

Permalink
Merge branch 'reorder-filter-dates'
Browse files Browse the repository at this point in the history
# Conflicts:
#	talks/templates/events/browse.html
  • Loading branch information
markdoub committed May 6, 2016
2 parents dc81c39 + 1eba64a commit 076db49
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions talks/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def parse_date(date_param):
from_date = datetime.strptime(date_param, "%d/%m/%y")
except Exception as e:
try:
from_date = datetime.strptime(date_param, "%d/%m/%y")
from_date = datetime.strptime(date_param, "%d/%m/%Y")
except Exception as e:
try:
from_date = datetime.strptime(date_param, "%Y-%m-%d")
Expand Down Expand Up @@ -91,4 +91,4 @@ def iso8601_duration(value):
# remove trailing zeros
seconds = seconds.rstrip('0')
time += '{}S'.format(seconds)
return u'P' + date + time
return u'P' + date + time
2 changes: 1 addition & 1 deletion talks/events/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def browse_events(request):
modified_request_parameters['subdepartments'] = "false"
if (len(request.GET) == 0) or (len(request.GET) == 1) and request.GET.get('limit_to_collections'):
today = date.today()
modified_request_parameters['start_date'] = today.strftime("%Y-%m-%d")
modified_request_parameters['start_date'] = today.strftime("%d/%m/%Y")
modified_request_parameters['include_subdepartments'] = True
modified_request_parameters['subdepartments'] = 'true'
elif request.GET.get('include_subdepartments'):
Expand Down
1 change: 1 addition & 0 deletions talks/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
<ul class="dropdown-menu">
<li {% if '/user/lists' in request.path %} class="active" {% endif %}><a href="{{ manage_lists }}"><span class="glyphicon glyphicon-list-alt"></span> Manage Collections</a></li>
<li {% if '/user/mytalks' in request.path %} class="active" {% endif %}><a href="{% url 'my-talks' %}"><span class="glyphicon glyphicon-list-alt"></span> My Talks</a></li>
<li><a href="http://talksox.readthedocs.io/en/latest/user/talk-editors/sign-up.html" target="blank"><span class="glyphicon glyphicon-list-alt"></span> Become an Editor</a></li>
<li><a href="{% url 'logout' %}">Logout</a></li>
</ul>
</li>
Expand Down
4 changes: 2 additions & 2 deletions talks/templates/events/browse.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ <h3 class="hidden-xs">Filters</h3>
});

$('.js-datetimepicker').datetimepicker({
format : 'YYYY-MM-DD',
format : 'DD/MM/YYYY',
allowInputToggle : true
}).each(function(i,v){
$(v).data("DateTimePicker").ignoreReadonly(true);
Expand All @@ -99,7 +99,7 @@ <h3 class="hidden-xs">Filters</h3>
$('#start_date').on('dp.change', function(e){
$('#to').data('DateTimePicker').minDate(e.date);
});

});
</script>

Expand Down

0 comments on commit 076db49

Please sign in to comment.