Better datepicker behaviour.

see #333
This commit is contained in:
Antoine Nguyen
2012-11-29 12:04:24 +01:00
parent 3757e419b9
commit ab2c9e3e9a
2 changed files with 8 additions and 3 deletions
@@ -6,7 +6,8 @@ Stats.prototype = {
constructor: Stats,
defaults: {
deflocation: "graphs/"
deflocation: "graphs/",
language: "en"
},
initialize: function(options) {
@@ -44,7 +45,10 @@ Stats.prototype = {
$("#id_to").attr("value", navobj.params.end);
}
$("#custom-period input").datepicker({
format: 'yyyy-mm-dd'
format: 'yyyy-mm-dd',
autoclose: true,
todayHighlight: true,
language: this.options.language
});
$("#searchquery").autocompleter({
choices: get_domains_list,
@@ -15,7 +15,8 @@ function get_domains_list(container) {
$(document).ready(function() {
var stats = new Stats({
graphurl: "{% url modoboa.extensions.stats.views.graphs %}",
deflocation: "{{ deflocation|safe }}"
deflocation: "{{ deflocation|safe }}",
language: "{{ LANGUAGE_CODE }}"
});
});
</script>