From ee025b06c59813c73fe5646f3c0915b8c020e910 Mon Sep 17 00:00:00 2001 From: Zambom Date: Thu, 27 Oct 2016 19:18:41 -0300 Subject: [PATCH] Resolving input date in course and adding bootstrap datepicker [Issue: #226] --- courses/static/js/course.js | 6 ++++++ courses/templates/course/update.html | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/courses/static/js/course.js b/courses/static/js/course.js index ca72c68..953fd8d 100644 --- a/courses/static/js/course.js +++ b/courses/static/js/course.js @@ -1,3 +1,9 @@ +var locale = navigator.language || navigator.userLanguage; + +$('.date-picker').datepicker({ + language: locale, +}); + /* * * Function to get a cookie stored on browser diff --git a/courses/templates/course/update.html b/courses/templates/course/update.html index 7a34228..47dae9a 100644 --- a/courses/templates/course/update.html +++ b/courses/templates/course/update.html @@ -18,7 +18,7 @@
{% if field.auto_id == 'id_init_register_date' or field.auto_id == 'id_end_register_date' or field.auto_id == 'id_init_date' or field.auto_id == 'id_end_date'%} - + {% elif field.auto_id == 'id_image' %} {% render_field field class='form-control' %}
-- libgit2 0.21.2